Opened 15 years ago

Closed 15 years ago

#4527 closed defect (fixed)

Tree: refactor tree so first element is specified in markup

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


test_Tree.html displays a list of continents but is missing a top level node called "Continents", which makes the formatting look strange and also confuses the user about how to drag and drop a new continent into the list. It also causes some complications for "empty trees", w.r.t a11y having to focus on the container itself since there is no top level node, but also just because users will get confused if there is a tree with not even a top node displayed.

Plan is to specify top level node in the HTML markup, like:

<div dojoType=dijit.Tree label="Continents" store="myContinentStore">

Change History (5)

comment:1 Changed 15 years ago by bill

Resolution: fixed
Status: newclosed

(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.

comment:2 Changed 15 years ago by bill

(In [10582]) Fix RTL tree. Refs #4527.

comment:3 Changed 15 years ago by bill

Resolution: fixed
Status: closedreopened

Lots of people want the first element to be optional (see so reopening this.

comment:4 Changed 15 years ago by bill

(In [10722]) Accidentally removed this line in [10580]. Putting back. Refs #4527.

comment:5 Changed 15 years ago by bill

Resolution: fixed
Status: reopenedclosed

(In [10726]) Make root node (the one with no corresponding item in the data store) optional. Fixes #4527.

Note: See TracTickets for help on using tickets.