Opened 12 years ago

Closed 12 years ago

#4301 closed defect (fixed)

Tree: should have a 'selectNode' method to auto-expand tree

Reported by: guest Owned by: bill
Priority: high Milestone: 1.0
Component: Dijit Version: 0.9
Keywords: Cc: lukelalo@…
Blocked By: Blocking:

Description

For example:

I've a tree initially collapsed, and I have a first default node on the tree - node7.

node1
node2
node3

If I had a method like myTree.selectNode(node7) my tree initially is displayed like this:

node1

node4
node5

node7

node6

node2
node3

Or if we have a tree and another navigation way (like a breadcrumb) we can sync them to display the selected node using the selectedNode method.
Pablo Garcia

Change History (2)

comment:1 Changed 12 years ago by bill

Milestone: 1.01.1
Owner: set to bill
Summary: dijit.Tree should have a 'selectNode' methodTree: should have a 'selectNode' method to auto-expand tree

Yes, this would be nice, or a way to set (or cookie) which nodes are opened/closed.

comment:2 Changed 12 years ago by bill

Milestone: 1.11.0
Resolution: fixed
Status: newclosed

OK, tk has checked in code to persist a tree's state via a cookie. I don't think we want to do more than that. The feature you suggest would be nice but doesn't fit within our architecture because we don't have any way to get the parent of a node. So I think this is something you could implement on the server by modifying the cookie that stores the tree's open nodes, but not something we want to bake directly into the client.

Note: See TracTickets for help on using tickets.