How can I code a simple auto complete feature with ExtJs? If the field has address and they start typing st
it should become street, etc
As Mitch suggests in his comment, you can use Ext.form.Combobox, properly configured, to do this. You won't need to bind anything to the keyup event, as Combobox will handle this for you.
Here's the beginning of a config that should work. You'll need to provide an appropariate Ext.data.Store (or subclass thereof), along with a few other config values (displayField,valueField,queryParam, etc). All the necessary stuff is pretty well documented in the API docs)
MyTypeahead = new Ext.form.ComboBox({
triggerAction:'all',
typeAhead:true,
mode:'remote',
minChars:2,
forceSelection:true,
hideTrigger:true
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With