Skip to content

Commit 5889639

Browse files
authored
fix: HybridSelectionModelOption should all be optional (#1173)
1 parent 43e31fa commit 5889639

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/models/selectionModelOption.interface.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,31 @@ export type SelectionType =
1515

1616
export interface HybridSelectionModelOption {
1717
/** defaults to True, do we want to select the active cell? */
18-
selectActiveCell: boolean;
18+
selectActiveCell?: boolean;
1919

2020
/** defaults to True, do we want to select the active row? */
21-
selectActiveRow: boolean;
21+
selectActiveRow?: boolean;
2222

2323
/** cell range selector */
2424
cellRangeSelector?: SlickCellRangeSelector;
2525

2626
/** Defaults to False, should we select when dragging? */
27-
dragToSelect: boolean;
27+
dragToSelect?: boolean;
2828

2929
/** Defaults to True, should we auto-scroll when dragging a row */
30-
autoScrollWhenDrag: boolean;
30+
autoScrollWhenDrag?: boolean;
3131

3232
/** Row Selection on RowMoveManage column */
33-
handleRowMoveManagerColumn: boolean;
33+
handleRowMoveManagerColumn?: boolean;
3434

3535
/** Row Selection on these columns */
36-
rowSelectColumnIds: string[];
36+
rowSelectColumnIds?: string[];
3737

3838
/** function to toggle Row Selection Models */
39-
rowSelectOverride: RowSelectOverride | undefined;
39+
rowSelectOverride?: RowSelectOverride | undefined;
4040

4141
/** Defaults to 'mixed', use a specifc selection type */
42-
selectionType: SelectionType;
42+
selectionType?: SelectionType;
4343
}
4444

4545
export interface RowSelectionModelOption {

src/plugins/slick.hybridselectionmodel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ export class SlickHybridSelectionModel implements SelectionModel {
282282

283283
const targetColumn = this._grid.getVisibleColumns()[data.cell];
284284
if (targetColumn) {
285-
return this._options?.rowSelectColumnIds.includes('' + targetColumn.id) || false;
285+
return this._options?.rowSelectColumnIds?.includes('' + targetColumn.id) || false;
286286
}
287287
return false;
288288
}

0 commit comments

Comments
 (0)