Skip to main content

Posts

Showing posts from July, 2013

JavaScript [ExtJs3]: Avoid default filtering in ComboBox

We had a requirement where we wanted to avoid default filtering provided by the ExtJs ComboBox. Instead we wanted to control it based on our business rules. To avoid default filtering we added “editable:false”, but it didn’t help much. As after selecting any value user cannot clear the value from field. We tried few more permutation-combination to achieve all the behaviour we wanted, but nothing worked. Use-Cases we wanted to achieve in combo boxForce user to select value from drop down list User can clear the value Disable the default filtering as filtering is applied based on some business rule and default filtering was clearing itHere is the final outcome, which satisfied all the use-cases. var combo = new Ext.form.ComboBox({ store : store, displayField : displayField, mode : 'local', triggerAction: 'all', forceSelection: true, autoSelect: false, // don't allow u…