combobox - Extjs : Selecting same value in multiselect combo not removing value -
i using ext5 multiselect combo. if select value dropdown, 'other' , click outside cancel dropdown. value 'other' shown in combo. again click dropdown , select tha same value 'other', should remove 'other' values. rather adds same value once again.
code given below:
xtype: 'combo', emptytext: 'retail bi', name: 'chainrefid', store: ext.create('shared.store.filter.chainrefs'), displayfield: 'name', multiselect: true, valuefield: 'chain_ref_id', listeners: { expand: function(){ this.getstore().load(); }, change: function(combo, newval) { if (!combo.eventssuspended) { var storecombo = ext.componentquery.query('combo[name=storeid]')[0]; storecombo.getstore().removeall(); storecombo.setvalue(null); var chaincombo = ext.componentquery.query('combo[name=chainid]')[0]; chaincombo.getstore().removeall(); chaincombo.setvalue(null); } } } is there solution this? in advance.
your combo's store gets reloaded on each expand. technically record corresponding value selected first time disappears on second store load, removing logic not "see" , therefore leaves in field.
remove this:
expand: function(){ this.getstore().load(); } , use autoload: true on store.
Comments
Post a Comment