How to adding field's config on the fly?

前端 未结 2 823
甜味超标
甜味超标 2021-01-12 12:08

I want to adding allow Blanks \'s config when i click on a node in my Tree Panel ! if node is a leaf , i want to put name field\'s config : allowBlank : false and if not a

相关标签:
2条回答
  • 2021-01-12 12:33

    In general, this is how you "apply" changes to an Ext component that you have already created.

    var combo = new Ext.form.ComboBox({some initial config});
    
    Ext.apply(combo, {your config object});
    

    How are you loading your Treenodes? You will probably do better by adding those properties from the back end if that's where it comes from.

    0 讨论(0)
  • 2021-01-12 12:35

    Set an id property for the desired combo box (id: 'anyId'), and use Ext.apply(Ext.getCmp('anyId'), {your config object});

    0 讨论(0)
提交回复
热议问题