I created a fiddle, which demonstrates the bug. The problem is that the tagfield ignores minChars
property - when you first focus on the field, you can see a request to the server, which should not happen. I did the same thing with the combobox and everything works good. This is my code:
Ext.create("Ext.form.field.Tag", {
renderTo: "test",
minChars: 999, //ignored, even though is documented
enableKeyEvents: true,
displayField: "text",
valueField: "id",
queryMode: "remote",
autocomplete: "off",
fieldLabel: "tagfield",
store: {
autoLoad:false,
fields:[{name:'id'},{name:'text'}],
proxy:{
type:'ajax',
url:'getData.php'
}
}
});
Ext.create("Ext.form.field.ComboBox", {
renderTo: "test2",
minChars: 999,
enableKeyEvents: true,
displayField: "text",
valueField: "id",
queryMode: "remote",
autocomplete: "off",
fieldLabel: "combo",
store: {
autoLoad:false,
fields:[{name:'id'},{name:'text'}],
proxy:{
type:'ajax',
url:'getData.php'
}
}
});
Please, pay attention to the fact that minChars
in both combobox and tagfield is documented similarly ([1], [2]):
minChars : Number
The minimum number of characters the user must type before autocomplete and typeAhead activate.
So, how can I fix this bug?
You need to set the triggerAction:'all' or triggerAction:'query' config option based on how your combo box should filter the results.
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