I have a problem with ExtJs combobox, consider I have a combobox that has 4 items and a callback function in select event on combobox.
When I’m going to set the combobox selected value with setValue(), ExtJs don’t fire select event.
How can I fix this problem?
Should I fire this event after setValue() by myself?
I can tell you what the sencha support told for that one year ago:
It depends on your case what you should do. For me I hanged my implementation so that I was able to call re responsible method but on the other hand I don’t see any downside when you fire the event yourself. So I think it is up to you which approach you like more.
Here is a example how you can fire the event by yourself (partly from the comment by @JohanHaest)
To make it simple I say you have only single selection enabled
or
There is a possible Hack in the current release (4.1.3) when setting a second argument on the
selectmethod totrue. This will, according to the sourcecode, fire the select event. But the First argument has to be a Model instance.So calling
will fire the select event but this behavior may change at any time (version) cause the assert is marked as private