Skip to content

Commit f92e238

Browse files
vaadin-botvursen
andauthored
refactor: use _getVisibleRows() when iterating visible rows (#5687) (#5688)
Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>
1 parent b132034 commit f92e238

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

‎packages/grid/src/vaadin-grid-data-provider-mixin.js‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
import { timeOut } from '@vaadin/component-base/src/async.js';
77
import { Debouncer } from '@vaadin/component-base/src/debounce.js';
8-
import { getBodyRowCells, iterateChildren, updateCellsPart, updateState } from './vaadin-grid-helpers.js';
8+
import { getBodyRowCells, updateCellsPart, updateState } from './vaadin-grid-helpers.js';
99

1010
/**
1111
* @private
@@ -403,12 +403,10 @@ export const DataProviderMixin = (superClass) =>
403403
this._cache.updateSize();
404404
this._effectiveSize = this._cache.effectiveSize;
405405

406-
iterateChildren(this.$.items, (row) => {
407-
if (!row.hidden) {
408-
const cachedItem = this._cache.getItemForIndex(row.index);
409-
if (cachedItem) {
410-
this._getItem(row.index, row);
411-
}
406+
this._getVisibleRows().forEach((row) => {
407+
const cachedItem = this._cache.getItemForIndex(row.index);
408+
if (cachedItem) {
409+
this._getItem(row.index, row);
412410
}
413411
});
414412

0 commit comments

Comments
 (0)