Opened 12 years ago

Last modified 9 years ago

#5536 closed defect

Tree: provide method to set top level children — at Initial Version

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


It's hard and impractical for Tree to tell if a new item or changed item should appear at the tree top level.

Assume a tree like

+ root
   - top 1
   - top 2
   - top 3

"Root" is an optionally displayed node that doesn't correspond to any item in the data store. The list of top* items is determined by Tree's query parameter.

When a new item is added to the data store Treee no way of knowing if it matches the query or not, without rerunning the query. It also doesn't know the sort order of the item, relative to it's siblings.

Similarly, any change to an item's attributes could potentially make it become or alternately stop it from being a top level item in the tree, so we need to rerun the query in that case too.

Since it's impractical for Tree to solve this problem, provide method for the user to notify the tree whenever the top level children have changed, by giving the new list of children. Tree will compare the current list to the new list and add/delete nodes as necessary.

Change History (0)

Note: See TracTickets for help on using tickets.