0

私は次のようなコンポーネントを持っています

Ext.define('Abc.view.main.Indicator', {
    extend: 'Ext.form.field.Tag',
    xtype: 'indicator',
    fieldLabel: 'indicator',
    name: 'indicator',
     filterPickList: true,
    displayField: 'value',
     value:'N',
    valueField: 'key',
    store: {
        type: 'indicator'
    }
});


Ext.define('Abc.store.Indicator', {
    extend: 'Ext.data.Store',
    alias: 'store.indicator',
    fields: ['key', 'value'],
    proxy: {
        type: 'memory',
        reader: {
            type: 'array'
        }
    },
    data: [
        ["ALL", "ALL"],
        ["Y", "Y"],
        ["N", "N"]
    ]
});

あなたが見るなら、私はNをデフォルト値として入れました。しかし、filterPickList: true を入れても、N はドロップダウン リストから削除されません。このためにコードを書く必要があるものはありますか?

4

1 に答える 1

0

ピッカーを展開してもレイアウトが更新されないようです。おそらくXjs6のバグです。一時的な回避策は、listeners durinf expand イベントを作成することです

Ext.define('Abc.view.main.Indicator', {
extend: 'Ext.form.field.Tag',
xtype: 'indicator',
fieldLabel: 'indicator',
name: 'indicator',
 filterPickList: true,
displayField: 'value',
 value:'N',
valueField: 'key',
store: {
    type: 'indicator'
},
listeners:{
    expand:function(me){
        me.doLayout();//this will refresh the combo and picker
    }
}
});
于 2016-07-11T12:31:04.367 に答える