Results 1 to 2 of 2

Thread: TreeStore nodeinsert event not fired for first child in node

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member matei's Avatar
    Join Date
    Jun 2008
    Location
    Cluj-Napoca
    Posts
    82
    Vote Rating
    3
      0  

    Exclamation TreeStore nodeinsert event not fired for first child in node

    Assuming we have a tree with some records.

    when insert a node as first node into TreeStore, nodeinsert event is not fired for first record

    steps:
    - select last row (has no childs), and press Add 2 times.
    - check tree title - it should contain first node title.


  2. #2
    Sencha Premium Member matei's Avatar
    Join Date
    Jun 2008
    Location
    Cluj-Napoca
    Posts
    82
    Vote Rating
    3
      0  

    Default

    update 1:
    seems that insertChild is calling insertBefore (wich triggers nodeinsert event), and appendChild (if there are no childs).
    my temporary solution is to listen to both events (nodeappend and nodeinsert)

    Code:
    store.on({
    	nodeappend: function (parent, node) {
    		//<debug>
    		console.warn('nodeappend', node.get('text'), node);
    		//</debug>
    		tree.setTitle(tree.getTitle() + '-' + node.get('text'));
    	},
    	nodeinsert: function (parent, node) {
    		//<debug>
    		console.warn('nodeinsert', node.get('text'), node);
    		//</debug>
    		tree.setTitle(tree.getTitle() + '-' + node.get('text'));
    	}
    });

Similar Threads

  1. Replies: 0
    Last Post: 7 Sep 2017, 1:41 AM
  2. [CLOSED] 'remove' event fired by treestore on node collapse
    By mankz in forum Ext 5: Bugs
    Replies: 2
    Last Post: 1 Jul 2014, 5:00 AM
  3. Replies: 1
    Last Post: 14 May 2014, 4:42 AM
  4. Replies: 2
    Last Post: 14 Nov 2012, 1:49 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •