Opened 10 years ago

Last modified 10 years ago

#11877 closed defect

TreeStoreModel: incorrect insertion of new items — at Initial Version

Reported by: Eric Pasquier Owned by:
Priority: high Milestone: 1.6
Component: Dijit Version: 1.5
Keywords: Tree TreeStoreModel Cc:
Blocked By: Blocking:


The newItem function of TreeStoreModel? is trying to pass an insertIndex parameter to store.newItem, which do not follow the specification, and is not used by the store. This is making all new items created at the end of the children list.

The Model should managed the insert position after the creation of the new item.

For example, pasteItem can be used to move the position of the new Item :

// Create new item in the tree, based on the drag source., pInfo);

// Move the new item to the insertIndex position
if (LnewItem && (insertIndex!=undefined)){
  this.pasteItem(LnewItem, parent, parent, false, insertIndex);

Change History (0)

Note: See TracTickets for help on using tickets.