search

Home  >  Q&A  >  body text

Select and edit when creating node.appendChild in EXTJS

I'm very new to Extjs and I'm currently working with a tree where I can create a branch and then create sections. I need help with the code editing functionality.

createSection: function(button){ var node = Button.up('menu').node;

if (node.data.leaf) {
        return false;
    }

    node.expand();

    var newSection = node.appendChild({
        name: 'New section ' + "(" + (node.childNodes.length +1) + ")" ,
        type: 'toc-by-system',
        leaf: false,
        id: uuid['v4'](),
        children: [],
        editor: {
            xtype: 'textfield'
        }
    });

    newSection.BeginEdit(),
},

P粉321676640P粉321676640235 days ago525

reply all(1)I'll reply

  • P粉614840363

    P粉6148403632024-04-04 15:05:20

    Check out this fiddle, it has options for single and double click editing Dynamic Tree Unit Editor

    reply
    0
  • Cancelreply