Opened 15 years ago

Closed 15 years ago

#4457 closed defect (fixed)

Option to have the top level of the tree start expanded

Reported by: Dustin Machi Owned by: Dustin Machi
Priority: high Milestone: 1.0
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


Change History (3)

comment:1 Changed 15 years ago by Dustin Machi

Resolution: fixed
Status: newclosed

(In [10502]) allw the top level of a tree to start expanded. fixes #4457

comment:2 Changed 15 years ago by bill

Component: GeneralDijit
Resolution: fixed
Status: closedreopened

This needs some more thought. See #4460. The reason I didn't add that option myself is that (depending on how you think of it) the top level of the tree is already expanded. In the countries tree example, there's an implicit "Continents" top level node, whose children are each continent. Maybe the top level node should be specified inline, and then all the child nodes should come from, like:

<div dojoType=dijit.Tree store=countriesStore>

but not sure if that's the best solution or not. It means that the data source can't specify the name of the top level node. Not sure if that's good or bad. Anyway, let's discuss.

comment:3 Changed 15 years ago by bill

Resolution: fixed
Status: reopenedclosed

(In [10580]) Refactor tree to have a special node (without a corresponding item) at the top of the tree, so that (for example) the continents/countries tree in test_Tree.html can have a top node marked "Continents" even though there is no such item in the data store.

This change requires handlers like onClick() to not fail when item==null, but rather to assume that's the root node.

Fixes #4527, #4419, #4457.

Note: See TracTickets for help on using tickets.