Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ComboBox: formBind buttons not updated if forceSelection and initially empty #1598
When a combo box has an initially empty value, is editable (can input text on its text field) and
Then when actually selecting a valid combo box' entry, the validity change even won't be triggered. Basically because it thinks the last validity change trigger was from false to true (which is again being triggered).
So, best ensure the combo box knows it went back to the false state. Although
The issue has been reproduced in pure Ext JS in this fiddle: forceSelection+initially empty combobox issue with validation.
The validityChange event was not being triggered, because the new
So, now in step 2, we re-run the validation code if the value changed. This would also help on advanced validation, for example, if regex validation and the previous result was a regexp-denied, the typed one regexp-ok, but forceSelection demanded the previous value to be selected. This could be true on a combo box with a "Choose a value" entry to suggest the user to choose a combo entry; yet that value should not be accepted as a choice.
We'll have to keep an eye open for Sencha fixing this issue in the future on their own.