Possibility to select one node from the id.
See original GitHub issueWould be good to have the possibility to select an node by the id. I did not find this possibility in the API. In this case should fire an event informing that the node has been selected.
One great tree component that i use is the jsTree (https://www.jstree.com) but it has the disadvantage of use jquery.
Follow my suggestion:
<Tree #tree [nodes]="nodes"></Tree>
<button (click)="tree.treeModel.selectNode(2)">next node</button>
nodes = [
{
id: 1,
name: ‘root1’,
isExpanded: true,
children: [
{
id: 2,
name: ‘child1’
}, {
id: 3,
name: ‘child2’
}
]
}
]
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:19 (4 by maintainers)
Top Results From Across the Web
Possibility to select one node from the id. · Issue #22 - GitHub
I have a list of folders that are being displayed in the treeview, i would like to select the folder by id, and...
Read more >Is it possible to select node or element by ID? - FunctionBay
To select nodes or elements, you need to select the 'Select Node' option or 'Select Element' option from the toolbar on the left...
Read more >jquery - How to select only one node in jstree when multiple ...
First I am searching nodes and getting all ID of searched nodes. Now I have "next" button where on click I have to...
Read more >Programmatically select node by it's id - Vue - Syncfusion
Is it possible to select a node programmatically through it's id? For example i want to select the node with id 4. Single...
Read more >Can I highlight a node or an element by its ID to locate it in the ...
In Worksheet, you have option to select a node or an element based ... To select the mesh by ID go to Selection...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I intend to solve this by adding locators on the tree according to id / path. Also, need an “ensureVisible” method that expands and scrolls to it.
So will be able to do: node = tree.findNodeById(id) or node = tree.findNodeByPath([‘parent’, ‘child’, ‘leaf’])
and then: node.toggleActivated(); node.ensureVisible();
What do you think?
On Tue, Aug 2, 2016 at 12:18 PM, Gillardo notifications@github.com wrote:
Adam Klein CTO & Co-Founder Tel. +972-52-747-5633 blog.500tech.com http://blog.500tech.com meetup.com/angularjs-il
I’m closing this issue though