Skip to content

Commit 671ed98

Browse files
committed
more clarifications as for selected nodes
1 parent 71fd701 commit 671ed98

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ <h1>Selected Node Binding <small>(selected-node)</small></h1>
324324
Like any other Angular bound value, updating selected-node will set the tree selection, and clicking the tree (selecting a node) will
325325
update back the selected-node.</p>
326326
<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>
327328
<p><a ng-click="selectNode(0)">select node 1</a><br>
328329
<a ng-click="selectNode(1)">select node 2</a><br>
329330
<a ng-click="selectNode(2)">select node 3</a><br>
@@ -437,8 +438,8 @@ <h1>Events <small>(on-expand & on-selection)</small></h1>
437438
</div>
438439
<div class="col-md-6">
439440
<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>
442443
<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
443444
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>
444445
<p>In order to prevent selection of branches (folders) in the tree, set the <code>options.dirSelectable</code> to <code>false</code>.
@@ -494,8 +495,8 @@ <h1>Multi Selection <small>(options.multiSelect & selected-nodes)</small></h1>
494495
</div>
495496
</div>
496497
<div class="col-md-6">
497-
<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.
499500
When using multi-selection, selecting a node adds it to the selected-nodes array and a second click remove it from the array.</p>
500501
<div class="row">
501502
<div class="col-md-6">

0 commit comments

Comments
 (0)