Skip to content

Commit

Permalink
fix: never activate more than 1 cell, clear any previous active CSS c…
Browse files Browse the repository at this point in the history
…lass (ghiscoding#1797)
  • Loading branch information
ghiscoding authored Jan 16, 2025
1 parent 30a6b19 commit 8b02e06
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/common/src/core/slickGrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5696,6 +5696,8 @@ export class SlickGrid<TData = any, C extends Column<TData> = Column<TData>, O e
}

if (this._options.showCellSelection) {
// make sure to never activate more than 1 cell at a time
document.querySelectorAll('.slick-cell.active').forEach((node) => node.classList.remove('active'));
this.activeCellNode.classList.add('active');
this.rowsCache[this.activeRow]?.rowNode?.forEach((node) => node.classList.add('active'));
}
Expand Down

0 comments on commit 8b02e06

Please sign in to comment.