You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Like any other Angular bound value, updating selected-node will set the tree selection, and clicking the tree (selecting a node) will
325
325
update back the selected-node.</p>
326
326
<p>Setting <code>selected-node</code> can also be used to set the default selected node of the tree.</p>
327
+
<p>Note that if using multiple selection, the selected nodes are bound to an Array property <code>selected-nodes</code> instead of <code>selected-node</code>.</p>
<P>The tree supports events for selection and expansion of nodes. The events are set using the <code>on-selection</code> and <code>on-node-toggle</code> attributes
440
-
which values are evaluated as angular expressions (like `ng-click` value). The expression can use the `node` and `selected` variables (for on-selection) or
441
-
the `node` and `expanded` variables (for on-node-toggle) for context of the clicked node and if it was selected / deselected or expanded / collapsed.</P>
441
+
which values are evaluated as angular expressions (like <code>ng-click</code> value). The expression can use the <code>node</code> and <code>selected</code> variables (for on-selection) or
442
+
the <code>node</code> and <code>expanded</code> variables (for on-node-toggle) for context of the clicked node and if it was selected / deselected or expanded / collapsed.</P>
442
443
<p>Note the events are fired only on the clicked node. If using the tree in single selection mode and one node is selected, when selecting a different node
443
444
only one on-selection event will be fired for the newly selected node. The old selected node will not be selected anymore without an on-selected event.</p>
444
445
<p>In order to prevent selection of branches (folders) in the tree, set the <code>options.dirSelectable</code> to <code>false</code>.
<P>The tree control supports multi-selection using the `options.multiSelect` option and the `selected-nodes` attribute (instead of the `selected-node` attribute in single selection mode).
498
-
`selected-nodes` is expected to be an Array which will contain the selected nodes.
498
+
<P>The tree control supports multi-selection using the <code>options.multiSelect</code> option and the <code>selected-nodes</code> attribute (instead of the <code>selected-node</code> attribute in single selection mode).
499
+
<code>selected-nodes</code> is expected to be an Array which will contain the selected nodes.
499
500
When using multi-selection, selecting a node adds it to the selected-nodes array and a second click remove it from the array.</p>
0 commit comments