PDA

View Full Version : Invalid entry in combobox keeps a valid value


fecund
04-19-2007, 05:22 PM
If I have a combo box (built with "transform" from an existing Select) with these choices:

+---------------+
|(Pick one...) |
+---------------+
| A thing |
| Choose me! |
| Last |
+---------------+


And then I pick one:

+---------------+
| Last |
+---------------+
| Last |
+---------------+


And then I type something which invalidates my choice:

+---------------+
| Last & Least |
+---------------+
+---------------+


The combobox keeps the value for "Last" and sends it back on a submit.

This seems like a bug, if what's typed in the combobox doesn't match anything, shouldn't the value should be empty?

jack.slocum
04-19-2007, 07:49 PM
What does your config look like?

fecund
04-20-2007, 02:39 PM
var c = new Ext.form.ComboBox({
triggerAction: 'all',
transform:id, // id='id_firm'
emptyText:'Select one, or type new...',
width:230
});