ExtJS – Update to ComboBox Replacement

Some people were asking for some additions to my ExtJS ComboBox replacement, so here is a quick little update.

This version adds in some minor fixes and a new feature. The ComboBox will now properly consume an existing combo. If you do not have selected=”true” on one of the options then this combo will clear the value of the ExtJS Combo box so that no value is selected.

I need to add some more documentation and testing and then I will make it an official UX component. I am also working on some examples of Ext’s combo vs this combo to show you why it is better.

Continue reading

ExtJS ComboBox Replacement

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:

  1. Forgetting to set “mode” to remote when I provide a store that is obviously “remote”
  2. Drop-down list width sometimes is smaller than the combo box itself
  3. I hate having to setup a store every time I need a remote ComboBox
  4. 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:

Edited to set lastQuery properly so ComboBox does not load the store twice when autoLoad is set to true (default).