Extension for Tree
that adds the concept of selection state for nodes.
Tree.Selectable
getSelectedNodes
Returns an array of nodes that are currently selected.
Array of selected nodes.
selectNode
node
[options]
Selects the specified node.
node
Tree.Node.Selectable
Node to select.
[options]
Object
optional
Options.
[silent=false]
Boolean
optional
If true
, the select
event
will be suppressed.
[src]
String
optional
Source of the change, to be passed along to the event facade of the resulting event. This can be used to distinguish between changes triggered by a user and changes triggered programmatically, for example.
unselect
[options]
Unselects all selected nodes.
[options]
Object
optional
Options.
[silent=false]
Boolean
optional
If true
, the unselect
event
will be suppressed.
[src]
String
optional
Source of the change, to be passed along to the event facade of the resulting event. This can be used to distinguish between changes triggered by a user and changes triggered programmatically, for example.
unselectNode
node
[options]
Unselects the specified node.
node
Tree.Node.Selectable
Node to unselect.
[options]
Object
optional
Options.
[silent=false]
Boolean
optional
If true
, the unselect
event
will be suppressed.
[src]
String
optional
Source of the change, to be passed along to the event facade of the resulting event. This can be used to distinguish between changes triggered by a user and changes triggered programmatically, for example.
_selectedMap
Mapping of node ids to node instances for nodes in this tree that are currently selected.
multiSelect
Whether or not to allow multiple nodes to be selected at once.
Default: false
multiSelectChange
Fires when the value for the configuration attribute multiSelect
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
e
EventFacade