Thank you for reporting this bug. We will make it our priority to review this report.
Combo boxes no longer assert their value.
Combo boxes no longer assert their value.
Ext version tested:
Browser versions tested against: Description:
Make a combo box allowBlank: false. You can select a value and then delete it. Didn't used to work that way in older Ext versions.Steps to reproduce the problem:
Created a fiddle here:http://ift.tt/17hFdzm
To see the problem:- Select a value from the drop down.
- Select the value.
- Delete the value.
- Now tab off.
Rather than selecting the value that was chosen, the combo is empty.I suspect the problem is here:
Code:
assertValue: function() { var me = this,
value = me.getRawValue(),
rec, currentValue,
displayValue = me.getDisplayValue();
if (me.forceSelection) {
if (me.multiSelect) {
// For multiselect, check that the current displayed value matches the current
// selection, if it does not then revert to the most recent selection.
if (value !== displayValue) {
me.setRawValue(displayValue);
}
} else {
// For single-select, match the displayed value to a record and select it,
// if it does not match a record then revert to the most recent selection.
rec = me.findRecordByDisplay(value);
if (rec) {
currentValue = me.value;
// Prevent an issue where we have duplicate display values with
// different underlying values.
if (!me.findRecordByValue(currentValue)) {
me.select(rec, true);
}
} else if (me.lastSelection) {
me.setRawValue(displayValue);
}
}
}
me.collapse();
},
Specifically hereCode:
else if (me.lastSelection) {
me.setRawValue(displayValue);
}
Shouldn't we be doing a me.setValue(me.lastSelection) here?
Combo boxes no longer assert their value.
Aucun commentaire:
Enregistrer un commentaire