I have a remote
combobox that allows filtering as the user types into it. I have the problem that, as the user types, later searches are returning faster than earlier ones (due to being more refined), but are then replaced when the earlier search eventually returns. That is, even though the user has entered a more refined search, they see the results of an earlier, less refined search.
I do not know if the fault here lies with the combobox or its internal store (or me :P), but it seems to me that one of them should probably be ignoring the responses to any of the older requests once they've issued a new one.
I am surprised not to have found any information about this occurring for other people. I would have thought the situation above - typing and continually refining a search, thus making the lookup faster - would be fairly common. Though, to be honest, I don't really know what to search for. Also, there may be a simple config option to this effect that I missed in the docs.
I realise I could play with minChars
and queryDelay
to mostly eliminate this issue, but the fact remains that there is still the possibility of it occurring.
Has anyone else had/solved this issue?
Edit: As requested, an example of a combobox that exhibits this behaviour:
{
xtype: 'combo',
mode: 'remote',
pageSize: 300,
minChars: 3,
queryDelay: 200,
pageSize: 10,
hideTrigger: true,
selectOnFocus: true,
enableKeyEvents: true,
typeAhead: false,
triggerAction: 'all',
forceSelection: true,
listEmptyText: 'No results',
valueField: 'id',
displayField: 'value',
store: {
url: '<url>',
reader: new Ext.data.JsonReader({
root: 'rows',
totalProperty: 'totalCount',
fields: ['id', 'value']
})
}
}
Though I suppose the issue is really dependant on the queries being made and the data being loaded.