It looks like you reloading the corresponding store
from the change event. Remote queries to server are baked into the combobox
.
You can specify queryMode:"remote"
in the combobox definition and the listener isn't required.
{
xtype: 'combo',
itemId: 'totalSearchCombo',
width: 200,
emptyText: 'Total Search',
typeAhead: true,
editable: true,
hideLabel: true,
hideTrigger: true,
store: 'dropDownList_s',
displayField: 'display_name',
anchor: '100%',
matchFieldWidth: false,
queryMode:'remote',
listConfig:
{
width: 195,
loadingText: 'Searching...',
emptyText: 'No matching items found, or not enough characters entered.',
getInnerTpl: function () {
var tpl = '<div>{display_name}</div>';
return tpl;
}
},
//pageSize: 15,
//listeners: {
// //FILTER THE APP LIST IF THE SEARCH FIELD HAS AT LEAST 3 CHARACTERS
// change: function () {
// if (Ext.ComponentQuery.query('combobox')[0].getValue().length > 2) {
// var filterValue = Ext.ComponentQuery.query('combobox')[0].getValue();
// var s = Ext.data.StoreManager.lookup('dropDownList_s');
// s.proxy.extraParams.action = 'searchForUser';
// s.proxy.extraParams.memName = filterValue;
// s.load();
// }
// }
//}
Take a look at the request in the browser's network tab and you will see a request fire with the parameter specified in query
. Set up your server-side code to read from that parameter (query
).
More info available in sencha docs