View Full Version : valueNotFoundText disappears

3 Jun 2014, 2:58 PM

I have in my application a combo configured like this:

fieldLabel: 'Class',
name: 'class_id',
xtype: 'combo',
columnWidth: 0.5,
store: Ext.data.StoreManager.lookup('Classes'),
valueNotFoundText: '--Select a class--',
queryMode: 'local',
valueField: 'id',
displayField: 'name',
forceSelection: true,
grow: true,
editable: false,

Everything works as expected, save one thing: valueNotFoundText disappears if I collapse the combo without selecting any value. I would like it to remain there until the user selects one of the available options.

I am using 4.1.3. Any ideas?

Thanks in advance!

Gary Schlosberg
6 Jun 2014, 4:00 PM
According to the docs, valueNotFoundText is only applied when setValue is called.

12 Jun 2014, 12:17 PM
Thanks for your answer.

It gets applied on creation, that's fine. But why does it disappear when the user collapses the option list without choosing any of them? It should remain visible.

I have tried to capture the "collapse" event and issue a setValue command with an invalid value, but it doesn't help.