Selectable callbacks
In addition to the standard configurable options of the selectable API, there are also a series of event callback options that can be used to specify functions that are executed at specific points during a select interaction. These options are as listed below.
|
Option |
Triggered when |
|---|---|
|
|
The select interaction ends and each element added to the selection triggers the callback. |
|
|
Each selected element triggers the callback during the select interaction. |
|
|
A select interaction begins. |
|
|
This is fired once, regardless of the number of items selected, as the select interaction ends. |
|
|
Any elements that are part of the selectable but are not selected during the interaction will fire this callback. |
|
|
Unselected elements will fire this during the select interaction. |
Selecting really only becomes useful when something happens to the elements once they have been selected, which is where this event model comes into play. Let's...