@@ -354,9 +354,10 @@ export const GridMixin = (superClass) =>
354354 const rows = [ ] ;
355355 for ( let i = 0 ; i < count ; i ++ ) {
356356 const row = document . createElement ( 'tr' ) ;
357- row . setAttribute ( 'part' , 'row body-row' ) ;
358357 row . setAttribute ( 'role' , 'row' ) ;
359358 row . setAttribute ( 'tabindex' , '-1' ) ;
359+ updatePart ( row , 'row' , true ) ;
360+ updatePart ( row , 'body-row' , true ) ;
360361 if ( this . _columnTree ) {
361362 this . __initRow ( row , this . _columnTree [ this . _columnTree . length - 1 ] , 'body' , false , true ) ;
362363 }
@@ -503,7 +504,8 @@ export const GridMixin = (superClass) =>
503504 }
504505 column . _cells . push ( cell ) ;
505506 }
506- cell . setAttribute ( 'part' , 'cell body-cell' ) ;
507+ updatePart ( cell , 'cell' , true ) ;
508+ updatePart ( cell , 'body-cell' , true ) ;
507509 cell . __parentRow = row ;
508510 // Cache the cell reference
509511 row . __cells . push ( cell ) ;
@@ -565,7 +567,8 @@ export const GridMixin = (superClass) =>
565567 column . _emptyCells . push ( cell ) ;
566568 }
567569 }
568- cell . part . add ( 'cell' , `${ section } -cell` ) ;
570+ updatePart ( cell , 'cell' , true ) ;
571+ updatePart ( cell , `${ section } -cell` , true ) ;
569572 }
570573
571574 if ( ! cell . _content . parentElement ) {
@@ -713,15 +716,17 @@ export const GridMixin = (superClass) =>
713716
714717 while ( this . $ . header . children . length < columnTree . length ) {
715718 const headerRow = document . createElement ( 'tr' ) ;
716- headerRow . setAttribute ( 'part' , 'row header-row' ) ;
717719 headerRow . setAttribute ( 'role' , 'row' ) ;
718720 headerRow . setAttribute ( 'tabindex' , '-1' ) ;
721+ updatePart ( headerRow , 'row' , true ) ;
722+ updatePart ( headerRow , 'header-row' , true ) ;
719723 this . $ . header . appendChild ( headerRow ) ;
720724
721725 const footerRow = document . createElement ( 'tr' ) ;
722- footerRow . setAttribute ( 'part' , 'row footer-row' ) ;
723726 footerRow . setAttribute ( 'role' , 'row' ) ;
724727 footerRow . setAttribute ( 'tabindex' , '-1' ) ;
728+ updatePart ( footerRow , 'row' , true ) ;
729+ updatePart ( footerRow , 'footer-row' , true ) ;
725730 this . $ . footer . appendChild ( footerRow ) ;
726731 }
727732 while ( this . $ . header . children . length > columnTree . length ) {
0 commit comments