Ticket #7187 (new enhancement)

Opened 6 months ago

Last modified 3 weeks ago

Tree loaded event

Reported by: Les Owned by:
Priority: normal Milestone: 2.0
Component: Dijit Version: 1.1.1
Severity: normal Keywords: Tree, dijit
Cc:

Description

I'd be grateful if tree loaded event could be added to the dijit.Tree widget :)

Here's the code I currently use (dojo 1.0.2) to simulate this event:

dojo.connect(dijit.Tree.prototype, '_onLoadAllItems', function(/*_TreeNode*/ node, /*dojo.data.Item[]*/ items) {
  var tree = this;
  if(!tree._loaded) {
    dojo.publish(tree.id + '-loaded', [tree]);
    tree._loaded = true;
  }
});

Change History

  Changed 6 months ago by bill

  • milestone changed from tbd to 2.0

in reply to: ↑ description   Changed 3 weeks ago by Les

Hi! Would it be possible to move this ticket to rel. 1.3?

  Changed 3 weeks ago by bill

Just FYI the function above will fire as soon as the top level of nodes has loaded. If the users has opened up the tree two or more levels deep, and that info is saved in a cookie, then the event will fire prematurely.

Not sure when I'll have time to get to this; will do my best.

Note: See TracTickets for help on using tickets.