I'm developing an extjs 6 application and recently figured out that it's not possible to set the value of a ComboBox using the setValue(value)
method when its store doesn't contain a record with a valueFiled
equals to value
as described here
http://docs.sencha.com/extjs/6.0/6.0.0-classic/#!/api/Ext.form.field.ComboBox-method-setValue.
So my question is is there any other way to change the value of the ComboBox when its store is empty (or doesn't contain a record with valueFiled
equals to value
) ?
select()
method. – CD..select( combo, record, eOpts )
Fires when at least one list item is selected I don't have any element in my store (its empty) so is the list of items... moreover this method is not used to change value – hzitounselect()
method (not event) will work, because in the code that method just callssetValue()
internally. Why are you trying to set a value when there isn't a list of values to choose from? Maybe you can use theemptyText
config to display a value when none is set? – cpastore84emptyText
it's not a solution because the value to set to the comboxBox changes depending on other value selected before... – hzitoun