I consider myself to be an expert in ExtJS. However, there is one component that I have to lookup how to use just about every single time I use it: Ext.form.ComboBox. For me, the default implementation just doesn’t cut it. There are a number of problems I have all the time:
- Forgetting to set “mode” to remote when I provide a store that is obviously “remote”
- Drop-down list width sometimes is smaller than the combo box itself
- I hate having to setup a store every time I need a remote ComboBox
- After the store loads, the value in the input box is not automatically replaced with displayValue
Maybe these issues are more my issues, but I maintain that ComboBox is one of poorer ExtJS components. Here is my replacement:
Please see the new code here: Update to ComboBox Replacement
Use it like this:
|
var combo1 = new com.succinctllc.form.ComboBox({ displayField:'name', valueField:'id', url:"/path/to/dataSource" }); |
Edited to set lastQuery properly so ComboBox does not load the store twice when autoLoad is set to true (default).