table cell selection improvement (#20854)

* Support SHIFT key for table cell selection

* fix for mac

* PR comment
This commit is contained in:
Alan Ren
2022-10-14 19:44:14 -07:00
committed by GitHub
parent a773be1bba
commit 5d731fe0ad
6 changed files with 79 additions and 50 deletions

View File

@@ -353,7 +353,7 @@ export abstract class GridTableBase<T> extends Disposable implements IView {
private table: Table<T>;
private actionBar: ActionBar;
private container = document.createElement('div');
private selectionModel = new CellSelectionModel<T>();
private selectionModel = new CellSelectionModel<T>({ hasRowSelector: true });
private styles: ITableStyles;
private currentHeight: number;
private dataProvider: HybridDataProvider<T>;
@@ -498,7 +498,7 @@ export abstract class GridTableBase<T> extends Disposable implements IView {
collection.setCollectionChangedCallback((startIndex, count) => {
this.renderGridDataRowsRange(startIndex, count);
});
this.rowNumberColumn = new RowNumberColumn({ numberOfRows: this.resultSet.rowCount });
this.rowNumberColumn = new RowNumberColumn({ autoCellSelection: false });
this.columns.unshift(this.rowNumberColumn.getColumnDefinition());
let tableOptions: Slick.GridOptions<T> = {
rowHeight: this.rowHeight,