How to adding field's config on the fly?

前端 未结 2 822
甜味超标
甜味超标 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.

提交回复
热议问题