Hello Ext Js users !
I'm having an issue with the remote filter option on a store.
My problem is : That i Have a store defined like follows :
Code:
Ext.define('MyApp.view.client.ClientListModel', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.clientlist-vm',
requires:[
'MyApp.model.Client'
]
,data: {
name: 'MyApp'
}
,stores:{
clients:{
type:'clients'
,fields:['clt_id', 'clt_nom','clt_est_archive']
,autoLoad:true
,remoteSort: true
,remoteFilter: true
,filters: [
{
property: 'clt_nom',
value: '{clientFieldRef.value}'
},
{
property: 'clt_est_archive',
value: 0
}
]
}
}
});
This grid has a research field in the tbar. Here is the definition of the grid
Code:
tbar: [
{
xtype :'textfield',
maxLength:50,
enforceMaxLength:true,
fieldLabel :'Recherche ',
emptyText : 'Nom du client',
maskRe:/[^;]/,
id:'clientTextField',
reference:'clientFieldRef',
publishes:['value']
}
This is working well but I have a problem. When my user fast type his client name (e.g : tmg ), 3 requests are sent to the server, but the longest request is the last to arrive and is the one that is used by the remote sort function.
In my example my user will type tmg but the results displayed are client with a T in their naime.
How can I avoid this ? Can I delay the remote filter ?
Thank you