@@ -25,7 +25,7 @@ import { DragAndDropMixin } from './vaadin-grid-drag-and-drop-mixin.js';
2525import { DynamicColumnsMixin } from './vaadin-grid-dynamic-columns-mixin.js' ;
2626import { EventContextMixin } from './vaadin-grid-event-context-mixin.js' ;
2727import { FilterMixin } from './vaadin-grid-filter-mixin.js' ;
28- import { updateRowAndCells , updateRowBodyCellsPart } from './vaadin-grid-helpers.js' ;
28+ import { iterateChildren , updateRowAndCells , updateRowBodyCellsPart } from './vaadin-grid-helpers.js' ;
2929import { KeyboardNavigationMixin } from './vaadin-grid-keyboard-navigation-mixin.js' ;
3030import { RowDetailsMixin } from './vaadin-grid-row-details-mixin.js' ;
3131import { ScrollMixin } from './vaadin-grid-scroll-mixin.js' ;
@@ -788,7 +788,7 @@ class Grid extends ElementMixin(
788788
789789 const contentsFragment = document . createDocumentFragment ( ) ;
790790
791- Array . from ( row . children ) . forEach ( ( cell ) => {
791+ iterateChildren ( row , ( cell ) => {
792792 cell . _vacant = true ;
793793 } ) ;
794794 row . innerHTML = '' ;
@@ -937,9 +937,9 @@ class Grid extends ElementMixin(
937937 * @protected
938938 */
939939 _renderColumnTree ( columnTree ) {
940- Array . from ( this . $ . items . children ) . forEach ( ( row ) =>
941- this . _updateRow ( row , columnTree [ columnTree . length - 1 ] , null , false , true ) ,
942- ) ;
940+ iterateChildren ( this . $ . items , ( row ) => {
941+ this . _updateRow ( row , columnTree [ columnTree . length - 1 ] , null , false , true ) ;
942+ } ) ;
943943
944944 while ( this . $ . header . children . length < columnTree . length ) {
945945 const headerRow = document . createElement ( 'tr' ) ;
@@ -959,14 +959,14 @@ class Grid extends ElementMixin(
959959 this . $ . footer . removeChild ( this . $ . footer . firstElementChild ) ;
960960 }
961961
962- Array . from ( this . $ . header . children ) . forEach ( ( headerRow , index , rows ) => {
962+ iterateChildren ( this . $ . header , ( headerRow , index , rows ) => {
963963 this . _updateRow ( headerRow , columnTree [ index ] , 'header' , index === columnTree . length - 1 ) ;
964964
965965 updateRowBodyCellsPart ( headerRow , 'first-header-row-cell' , index === 0 ) ;
966966 updateRowBodyCellsPart ( headerRow , 'last-header-row-cell' , index === rows . length - 1 ) ;
967967 } ) ;
968968
969- Array . from ( this . $ . footer . children ) . forEach ( ( footerRow , index , rows ) => {
969+ iterateChildren ( this . $ . footer , ( footerRow , index , rows ) => {
970970 this . _updateRow ( footerRow , columnTree [ columnTree . length - 1 - index ] , 'footer' , index === 0 ) ;
971971
972972 updateRowBodyCellsPart ( footerRow , 'first-footer-row-cell' , index === 0 ) ;
@@ -1020,7 +1020,7 @@ class Grid extends ElementMixin(
10201020 this . _generateCellClassNames ( row , model ) ;
10211021 this . _filterDragAndDrop ( row , model ) ;
10221022
1023- Array . from ( row . children ) . forEach ( ( cell ) => {
1023+ iterateChildren ( row , ( cell ) => {
10241024 if ( cell . _renderer ) {
10251025 const owner = cell . _column || this ;
10261026 cell . _renderer . call ( owner , cell . _content , owner , model ) ;
0 commit comments