I am trying to create a Extjs combo box containing states where the user is able to type ahead with the full State name and the State code.
For example if you type ‘NY’ you will get New York same if you type ‘New Y’.
I am trying to create a Extjs combo box containing states where the user
Share
well that’s the default behaviour for typeahead, if you want that beahaviour for state Code i suggest you implement it yourself, it shouldn;t be to hard you add the change event on the combobox, and inside you use filterBy method for the store of the combobox. FilterBy takes as an argument a function which is caled for each record. The filtering in fact is returning true or false, so basicly you want something like ‘
return rec.data.stateCode == this.getValue() || rec.data.statename.indexOf(this.getValue)>0.I hope this can help you