Results 1 to 2 of 2

Thread: Tree appendChild() with children does not sync children.

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Touch Premium Member
    Join Date
    Dec 2011
    Posts
    36

    Default Tree appendChild() with children does not sync children.

    I have noticed that if I do this:

    PHP Code:
    var root Ext.getCmp('permissions-tree-panel').getRootNode()        
    root.appendChild({           
        
    text'New Program',
        
    name'NewProgram',
        
    generatedName'',
        
    description'Please rename me!',
        
    qtip'Please rename me!',
        
    children: [{
            
    text'New Permission',
            
    name'NewPermission',
            
    generatedName'',
            
    description'Please rename me!',
            
    qtip'Please rename me!',
            
    leaftrue
         
    }] 
    }) 
    That the child node does not get synced. I end up having to make sure and append a child on the new record like so:

    PHP Code:
    var root Ext.getCmp('permissions-tree-panel').getRootNode()        
    var 
    program root.appendChild({
        
    text'New Program',
        
    name'NewProgram',
        
    generatedName'',
        
    description'Please rename me!',
         
    qtip'Please rename me!',
    })

    program.appendChild({
        
    text'New Permission',
        
    name'NewPermission',
        
    generatedName'',
        
    description'Please rename me!',
        
    qtip'Please rename me!',
        
    leaftrue
    }) 
    Correct me if I am wrong, but this seems to be a bug.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,448

    Default

    Your first code snippet worked fine for me in 4.0.7 and later.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

Posting Permissions

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