@@ -1061,21 +1061,40 @@ PivotView.prototype.renderRawData = function (data) {
10611061 var vertical = targetElement === LHTHead ,
10621062 rendered , separatelyGrouped , tr , th , div , checkbox ;
10631063
1064+ function applySelect ( element ) { // checkbox element
1065+ var checked = element . checked ;
1066+ while ( element = element . parentNode ) {
1067+ if ( element . tagName === "TR" ) {
1068+ element . classList [ checked ? "add" : "remove" ] ( "lpt-selectedRow" ) ;
1069+ _ . elements . tableContainer . querySelector ( ".lpt-tableBlock table" )
1070+ . rows [ element . rowIndex ]
1071+ . classList [ checked ? "add" : "remove" ] ( "lpt-selectedRow" ) ;
1072+ break ;
1073+ }
1074+ }
1075+ }
1076+
10641077 if ( xFrom === xTo && LISTING_SELECT_ENABLED ) { // listing
10651078 for ( y = yFrom ; y < yTo ; y ++ ) {
10661079 tr = document . createElement ( "tr" ) ;
10671080 th = document . createElement ( "td" ) ;
10681081 checkbox = document . createElement ( "input" ) ;
10691082 checkbox . setAttribute ( "type" , "checkbox" ) ;
10701083 checkbox . checked = ! ! _ . selectedRows [ y ] ;
1084+ if ( checkbox . checked ) ( function ( checkbox ) {
1085+ setTimeout ( function ( ) { // highlight the rows after html generated
1086+ applySelect ( checkbox ) ;
1087+ } , 1 ) ;
1088+ } ) ( checkbox ) ;
10711089 th . setAttribute ( "style" , "padding: 0 !important;" ) ;
10721090 checkbox . addEventListener ( "click" , ( function ( y ) { return function ( e ) {
10731091 var element = e . srcElement || e . target ;
10741092 e . preventDefault ( ) ;
10751093 e . cancelBubble = true ;
1076- setTimeout ( function ( ) { // bad, but only working workaround for ISC DeepSee
1094+ setTimeout ( function ( ) { // bad, but the only working workaround for ISC DeepSee
10771095 element . checked = ! element . checked ;
10781096 _ . selectRow . call ( _ , element . checked , y ) ;
1097+ applySelect ( element ) ;
10791098 } , 1 ) ;
10801099 } } ) ( y ) ) ;
10811100 th . appendChild ( checkbox ) ;
0 commit comments