Constructors
constructor
- new Selection<T>(allValues?: readonly T[], options?: { mode: string; unselectable: boolean }): Selection<T>
-
Type parameters
Parameters
-
allValues: readonly T[] = []
-
options: { mode: string; unselectable: boolean } = ...
-
mode: string
-
unselectable: boolean
Properties
Readonly selection
selection: any = ...
Private Readonly selectionHolder
Methods
click
- click(item: T, options?: { ctrlDown?: boolean; shiftDown?: boolean }): void
-
Parameters
-
item: T
-
options: { ctrlDown?: boolean; shiftDown?: boolean } = {}
-
Optional ctrlDown?: boolean
-
Optional shiftDown?: boolean
Returns void
Private processMultiClick
- processMultiClick(item: T): void
Private processMultiContinuousClick
- processMultiContinuousClick(item: T, isShiftDown: boolean): void
-
Parameters
-
item: T
-
isShiftDown: boolean
Returns void
Private processMultiControlClick
- processMultiControlClick(item: T, isCtrlDown: boolean): void
-
Parameters
-
item: T
-
isCtrlDown: boolean
Returns void
Private processSingleClick
- processSingleClick(item: T): void
setOptions
- setOptions(options: Partial<SelectableOptions>): void
-
Parameters
-
options: Partial<SelectableOptions>
Returns void
setValues
- setValues(values: T[]): void