Constructor
new Treeview()
- Deprecated:
- since 7.2
- Source:
Members
(static, non-null) STATE :Object
Treeview state definition.
Type:
- Object
- Source:
Methods
attached()
- Source:
disposed()
- Source:
getNodeObj(pathnon-null) → (non-null) {Object}
Gets the node object from the `nodes` state that is located at the given
index path.
Parameters:
Name | Type | Description |
---|---|---|
path |
Array.<number> | An array of indexes indicating where the searched node is located inside the `nodes` state. |
- Source:
Returns:
- Type
- Object
(protected) getPath_(nodenon-null) → (non-null) {Array.<string>}
Gets the treeview path for a given node.
Parameters:
Name | Type | Description |
---|---|---|
node |
Element |
- Source:
Returns:
- Type
- Array.<string>
(protected) handleKeyboardFocused_(datanon-null)
Handles the `focused` event from `KeyboardFocusManager`. Stores the ref
of the last focused tree item so that we can retain it in the tab order
when the user leaves the tree.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object |
- Source:
(protected) handleLeftArrow_(pathnon-null, objnon-null) → (nullable) {string}
Handles the left arrow being pressed. If the node is expanded, it will be
closed. If it's closed, its parent's ref will be returned so it can be
focused by `KeyboardFocusManager`.
Parameters:
Name | Type | Description |
---|---|---|
path |
Array.<string> | |
obj |
Object |
- Source:
Returns:
- Type
- string
(protected) handleNextFocus_(eventnon-null) → {boolean|string|Element}
Handles focus through keyboard.
Parameters:
Name | Type | Description |
---|---|---|
event |
Event |
- Source:
Returns:
- Type
- boolean | string | Element
(protected) handleNodeClicked_(eventnon-null)
This is called when one of this tree view's nodes is clicked.
Parameters:
Name | Type | Description |
---|---|---|
event |
Event |
- Source:
(protected) handleNodeKeyUp_(eventnon-null)
This is called when one of this tree view's nodes receives a keypress.
If the pressed key is ENTER or SPACE, the node's expanded state will be toggled.
Parameters:
Name | Type | Description |
---|---|---|
event |
Event |
- Source:
(protected) handleRightArrow_(pathnon-null, objnon-null) → (nullable) {string}
Handles the right arrow being pressed. If the node is closed, it will be
expanded. If it's already expanded, the ref of its first child will be
returned so it can be focused by `KeyboardFocusManager`.
Parameters:
Name | Type | Description |
---|---|---|
path |
Array.<string> | |
obj |
Object |
- Source:
Returns:
- Type
- string
(protected) toggleExpandedState_(nodenon-null)
Toggles the expanded state for the given tree node.
Parameters:
Name | Type | Description |
---|---|---|
node |
Element |