penot
21 Nov 2012, 8:30 AM
Hi,
I'm using extjs 4.1
This problem is Comboboxs Store Data displayField Value Duplicate select
and out of focus by Combobox worked change event then
auto select change first duplicate value ..
{
xtype: 'combobox',
width: 160,
id : "sms_itemCode",
name : "itemCode",
fieldLabel: '',
labelAlign: 'right',
"store": itemSimple_List,
"valueField": 'valueData',
"displayField": 'viewData',
"typeAhead" : true,
"transform" : 'stateSelect',
"forceSelection" : true,
"queryMode": 'local',
allowBlank : false,
disabled: true,
x: 775,
y: 20,
"doQuery" : function(queryString, forceAll) {
this.expand();
this.store.clearFilter(!forceAll);
if (!forceAll) {
this.store.filter(this.displayField,queryString);
}
},
listeners : {
change : function(combo, newval, oldval, eOpts){
console.log(newval);
console.log(oldval);
console.log(eOpts);
this.getStore().clearFilter(true);
}
}
}
EX > store Data ValueField, DisplayField
[ {1, "comp"},
{2, "comp"} ]
I select 2, comp then auto change 1, comp
console logs
1040100113 <-- select combobox Item
comp <-- display value (autocomplite oldval)
Object <-- eOpts
1040100112 <-- out of focus auto change
Thanks in advanced.
I'm using extjs 4.1
This problem is Comboboxs Store Data displayField Value Duplicate select
and out of focus by Combobox worked change event then
auto select change first duplicate value ..
{
xtype: 'combobox',
width: 160,
id : "sms_itemCode",
name : "itemCode",
fieldLabel: '',
labelAlign: 'right',
"store": itemSimple_List,
"valueField": 'valueData',
"displayField": 'viewData',
"typeAhead" : true,
"transform" : 'stateSelect',
"forceSelection" : true,
"queryMode": 'local',
allowBlank : false,
disabled: true,
x: 775,
y: 20,
"doQuery" : function(queryString, forceAll) {
this.expand();
this.store.clearFilter(!forceAll);
if (!forceAll) {
this.store.filter(this.displayField,queryString);
}
},
listeners : {
change : function(combo, newval, oldval, eOpts){
console.log(newval);
console.log(oldval);
console.log(eOpts);
this.getStore().clearFilter(true);
}
}
}
EX > store Data ValueField, DisplayField
[ {1, "comp"},
{2, "comp"} ]
I select 2, comp then auto change 1, comp
console logs
1040100113 <-- select combobox Item
comp <-- display value (autocomplite oldval)
Object <-- eOpts
1040100112 <-- out of focus auto change
Thanks in advanced.