selection([indexes])
Class: Tree.
Description:
Gets or sets the selected items in the tree. When setting selection, items that were previously selected but are not in the indexes argument will get deselected.
- To get the current selection, call without arguments.
- To set the selection, pass an array of index paths (array of arrays of index integers).
Parameters:
| Name | Type | Description |
|---|---|---|
|
|
Array.<Array.<number>> |
An array of index paths to select. (array of arrays) |
Returns:
Returns the current selection when called without arguments, or this Tree instance when setting.
Type: Array.<Array.<number>> | Tree
