EXT JS 4: EMPTY VALUE IN A COMBOBOX Often, in an Ext JS combobox, it is difficult to go back to an empty value once you have selected an item, particularly if “forceSelection” is set to true. Here is my roundup of alternative solutions found from around the web… 1. Override beforeBlur The solution from http://www.sencha.com/forum/showthread.php?182119-How-To-Re-Empty-ComboBox-when-forceSelection-is-Set-To-TRUE overrides beforeBlur on the combbox to clear out lastSelection. Here is a copy of the override from the thread: 1 2 3 4 5 6 7 8 9 10 11 12 13 Ext.create( 'Ext.form.field.ComboBox' , { ... allowBlank: true , forceSelection: true , beforeBlur: function (){ var value = this .getRawValue(); if (value ...
Comments
Post a Comment