Skip to content

Commit 0e87a35

Browse files
author
Alyar
committed
fix: clear stale first-cell classes before recalculating in columns view (T1318812)
1 parent 7b9216a commit 0e87a35

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

packages/devextreme/js/__internal/grids/grid_core/views/m_columns_view.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,12 @@ export class ColumnsView extends ColumnStateMixin(modules.View) {
720720
appendTemplate.render({ content: $row, container: $table });
721721
}
722722

723+
private removeFirstCellClasses(): void {
724+
const firstCellClass = this.addWidgetPrefix(CLASSES.firstCell);
725+
726+
this._tableElement?.find(`.${firstCellClass}`).removeClass(firstCellClass);
727+
}
728+
723729
protected toggleFirstCellClass(
724730
$cell: dxElementWrapper | undefined,
725731
isFirstValue: boolean,
@@ -737,6 +743,8 @@ export class ColumnsView extends ColumnStateMixin(modules.View) {
737743
protected updateFirstCellClasses(): void {
738744
const rows = this._getRows();
739745

746+
this.removeFirstCellClasses();
747+
740748
rows.forEach((row, index) => {
741749
const rowIndex = row.rowType === 'header' ? index : null;
742750
const firstColumn = this._columnsController.getFirstColumn(rowIndex);

0 commit comments

Comments
 (0)