i am getting struck with sencha touch select field change event. Usual change event is working fine. but in case option values like this,
{
xtype: 'selectfield',
label: 'Choose one',
options: [{text: 'First Option', value: 1},
{text: 'First Option', value: 2},
{text: 'Third Option', value: 3}],
listeners : {
change : function (selectField, newValue, oldValue)
{
console.log(newValue);
}
}
}
When this case values are different but display values are same, change event didn't work. Please help to finish this issue.
This is issue with Sencha. you can check this link
But If You have a need to do this then you can do with this way, write this in launch function.
Ext.override(Ext.field.Input, {
setValue: function (newValue) {
var oldValue = this._value;
this.updateValue(this.applyValue(newValue));
newValue = this.getValue();
this.onChange(this, newValue, oldValue);
return this;
}
});