Skip to content

Commit 08bccd0

Browse files
committed
fix tests and bugs
1 parent c6ed7c9 commit 08bccd0

File tree

3 files changed

+139
-535
lines changed

3 files changed

+139
-535
lines changed

packages/grid/src/vaadin-grid-mixin.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -642,12 +642,12 @@ export const GridMixin = (superClass) =>
642642

643643
if (row.parentElement === this.$.header) {
644644
this.$.table.toggleAttribute('has-header', this.$.header.querySelector('tr:not([hidden])'));
645-
this.__updateHeaderFooterRowParts('header', [row]);
645+
this.__updateHeaderFooterRowParts('header');
646646
}
647647

648648
if (row.parentElement === this.$.footer) {
649649
this.$.table.toggleAttribute('has-footer', this.$.footer.querySelector('tr:not([hidden])'));
650-
this.__updateHeaderFooterRowParts('footer', [row]);
650+
this.__updateHeaderFooterRowParts('footer');
651651
}
652652

653653
// Make sure the section has a tabbable element
@@ -732,16 +732,16 @@ export const GridMixin = (superClass) =>
732732
iterateChildren(this.$.header, (headerRow, index) => {
733733
this.__initRow(headerRow, columnTree[index], 'header', index === columnTree.length - 1);
734734
});
735-
this.__updateHeaderFooterRowParts('header', [...this.$.header.children]);
736735

737736
iterateChildren(this.$.footer, (footerRow, index) => {
738737
this.__initRow(footerRow, columnTree[columnTree.length - 1 - index], 'footer', index === 0);
739738
});
740-
this.__updateHeaderFooterRowParts('footer', [...this.$.footer.children]);
741739

742740
// Sizer rows
743741
this.__initRow(this.$.sizer, columnTree[columnTree.length - 1]);
744742

743+
this.__updateHeaderFooterRowParts('header');
744+
this.__updateHeaderFooterRowParts('footer');
745745
this._resizeHandler();
746746
this._frozenCellsChanged();
747747
this._updateFirstAndLastColumn();
@@ -754,9 +754,9 @@ export const GridMixin = (superClass) =>
754754
}
755755

756756
/** @private */
757-
__updateHeaderFooterRowParts(section, rows) {
757+
__updateHeaderFooterRowParts(section) {
758758
const visibleRows = [...this.$[section].querySelectorAll('tr:not([hidden])')];
759-
rows.forEach((row) => {
759+
[...this.$[section].children].forEach((row) => {
760760
updatePart(row, row === visibleRows.at(0), `first-${section}-row`);
761761
updatePart(row, row === visibleRows.at(-1), `last-${section}-row`);
762762

0 commit comments

Comments
 (0)