PDA

View Full Version : How to Do Custom Autocomplete function for ext Combobox



jgate
12 Jun 2013, 10:25 AM
Hi -

I have an extjs combobox which has autocomplete enabled. Right now the matching is done by the starting of the list. I want to do a word matching in the full string rather than the start. For eg, if the list is

Code Complete
Platform Code
Code Master

Right now when I type "Code", it show "Code Complete" and "Code Master"

Rather I also want to get the Platform Code also in the list, along with other two.

Let me know how I can do this.

Thanks

slemmon
14 Jun 2013, 10:15 AM
The anyMatch config for combo in 4.2.1 should help you do what you're wanting to do I believe:
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.field.ComboBox-cfg-anyMatch

loumac
12 Jul 2013, 1:13 AM
anyMatch not matching string in any position in the field value:

I have the following config for my combobox using 4.2.1 code base
anyMatch: true,
autoSelect: true,
minChars: 3,
caseSensitive: false,
queryMode: 'remote'

I have standard data[] as root data json

in my list i have the following Speedy Couriers, Couriers - but when typing in couri I don't get a match on Speedy Couriers - do I need to configure something else if the queryMode is remote, or am I missing some other config?

thanks in advance

loumac
12 Jul 2013, 1:35 AM
maybe I need to pass filter=couri store proxy param to server, reduce list on server?

loumac
12 Jul 2013, 5:02 AM
yes works with server filter:)