PDA

View Full Version : Combo is not auto-completing when overriding doQuery function



rafaelrp
8 Oct 2013, 8:17 PM
Hello!

I'm having a problem with autocomplete, if i override the doQuery function to get the result any where the combo not auto complete when typing.

Here is the doQuery funciton and the combo config.


fieldLabel: 'Veiculo',
displayField: 'text',
valueField: 'id',
name: 'name',
store: storeCombo,
forceSelection: true,
queryMode: 'local',
typeAhead: true,
editable: true,
allowBlank:false,
autoSelect:true,
doQuery: function(queryString, forceAll) {
this.expand();
this.store.clearFilter(!forceAll);


if (!forceAll) {
this.store.filter(this.displayField, new RegExp(Ext.String.escapeRegex(queryString), 'i'));
}
}


Thanks! ~o)

rafaelrp
9 Oct 2013, 3:29 PM
up! ~o)

ettavolt
10 Oct 2013, 1:49 AM
You should take a look on what you have overridden (I mean framework's code).