PDA

View Full Version : Combobox default value



Noisyogui
28 Apr 2020, 9:48 AM
Goal: I want to set as default , a value that is on my combobox list

Current state: It shows nothing but the label.

I've been reading the docu (https://docs.sencha.com/extjs/7.0.0/modern/Ext.field.ComboBox.html?), but can't get the way to solve my problem.

I've seen this solution on an older post (https://forum.sencha.com/forum/showthread.php?298780-how-to-give-a-default-value-of-combobox), that says using

value: states.first()
will show the first element. It is not exactly what i want but it can do the job.
Here state is a reference for the
store:states value

The problem i have, is that in my code my store value looks like this:


store: {type:"horarios", autoLoad:true}

Wish someone can show me the right way to understand this, Thank you