true
for shifting to next/previous item in list of items by Left Arrow
/Right Arrow
keys instead of Arrow Up
/Arrow Down
keys.
true
to make possible to pick several items in list of items (by clicking range of items with pressed Shift
key, for example).
Any implementation of SelectionService to perform actual selection.
If true
, then next item selection doesn't clear selection of previously selected items. The only way to clean selection is second click on previously selected element.
This can be used to implement accordion-like behavior in application-defined UI component.
Common handler for keyboard events. Depending on specified parameters calls onNextKey, onPreviousKey, trySelectPreviousItem, trySelectNextItem or trySelectAll handler.
true
if Ctrl
key was pressed.
true
if Shift
key was pressed.
specifies code of key that was pressed. This method can handle next keys: KeyCodes.ArrowUp, KeyCodes.ArrowLeft, KeyCodes.ArrowDown, KeyCodes.ArrowRight, KeyCodes.Tab and KeyCodes.A.
true
if any of executed commands was applied.
Common handler for mouse events.
true
if Ctrl
key was pressed.
true
if Shift
key was pressed.
specifies which mouse button was pressed.
index of clicked element in SelectionService.items collection.
true
if any of executed commands was applied.
Common handler for Arrow Down
key (Arrow Right
if {@link SelectionAreaConfig.horizontal} is true
). Calls applicable handlers one by one until any returns true
.
true
if Ctrl
key was pressed.
true
if Shift
key was pressed.
true
if any of executed commands was applied.
Common handler for Arrow Up
key (Arrow Left
if {@link SelectionAreaConfig.horizontal} is true
). Calls applicable handlers one by one until any returns true
.
true
if Ctrl
key was pressed.
true
if Shift
key was pressed.
true
if any of executed commands was applied.
Tries to select element that is next to the last processed element and last processed element was deselected.
true
if Ctrl
key was pressed.
true
if Shift
key was pressed.
true
if command was applied.
Tries to select element that is previous to the last processed element and last processed element was deselected.
true
if Ctrl
key was pressed.
true
if Shift
key was pressed.
true
if command was applied.
Tries to deselect last selected element when Shift+Arrow Up
combination pressed (Shift+Arrow Left
if {@link SelectionAreaConfig.horizontal} is true
).
true
if Shift
key was pressed.
true
if command was applied.
Tries to deselect last selected element when Shift+Arrow Down
combination pressed (Shift+Arrow Right
if {@link SelectionAreaConfig.horizontal} is true
).
true
if Shift
key was pressed.
true
if command was applied.
Selects first element in SelectionService.items if nothing was selected before.
true
if command was applied.
Tries to select all items if Ctrl+A
combination was pressed.
true
if command was applied.
Tries to select all elements starting from last selected element up to first element in SelectionService.items when Ctrl+Shift+Arrow Up
combination was pressed
(Ctrl+Shift+Arrow Left
if {@link SelectionAreaConfig.horizontal} is true
).
true
if Ctrl
key was pressed.
true
if Shift
key was pressed.
true
if command was applied.
Tries to select all elements starting from last selected element up to last element in SelectionService.items when Ctrl+Shift+Arrow Down
combination was pressed
(Ctrl+Shift+Arrow Right
if {@link SelectionAreaConfig.horizontal} is true
).
true
if Ctrl
key was pressed.
true
if Shift
key was pressed.
true
if command was applied.
Tries to select first element in SelectionService.items when Ctrl+Arrow Up
combination was pressed (Ctrl+Arrow Left
if {@link SelectionAreaConfig.horizontal} is true
).
true
if Ctrl
key was pressed.
true
if Shift
key was pressed (with pressed Shift
this command would not be applied).
true
if command was applied.
Tries to select last element in SelectionService.items when Ctrl+Arrow Down
combination was pressed (Ctrl+Arrow Right
if {@link SelectionAreaConfig.horizontal} is true
).
true
if Ctrl
key was pressed.
true
if Shift
key was pressed (with pressed Shift
this command would not be applied).
true
if command was applied.
Tries to select next item when Arrow Down
was pressed (Right Arrow
if {@link SelectionAreaConfig.horizontal} is true
).
If Shift
was pressed and {@link SelectionAreaConfig.multiple} is 'true' then elements selected before stays selected.
true
if Shift
key was pressed.
true
if command was applied.
Tries to select previous item when Arrow Up
was pressed (Arrow Left
if {@link SelectionAreaConfig.horizontal} is true
).
If Shift
was pressed and {@link SelectionAreaConfig.multiple} is 'true' then elements selected before stays selected.
true
if Shift
key was pressed.
true
if command was applied.
Generated using TypeDoc
Helper class that can be used by application-defined UI components for handling keyboard and mouse interaction with component.
Implements selection model that is similar to Excel or Google Sheets. Concrete handled patterns you can see in concrete methods documentation.
This implementation doesn't use any browser specific objects such as events and doesn't use any browser API.