Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extjs combobox autocomplete doesn't work

I have an editor grid and a combobox is one of its fields. The combobox uses a json store. Here is the combobox code:

var patternCmb = new Ext.form.ComboBox({ //combobox for workers
    store:  dsPatterns,
    valueField: 'pid',
    displayField: 'pname',
    typeAhead:true, 
    lazyRender:true,
    forceSelection:true,
    minChars: 2, 
    valueNotFoundText:"not found",
    editable: true,
    triggerAction: 'all' 
});

After typing the third character the FIRST (not correct) value of the store is selected. What can be the problem?

like image 515
lvil Avatar asked Oct 12 '22 07:10

lvil


1 Answers

Try the following:

  1. Set mode: 'local' in your combobox.
  2. Ensure that you have autoLoad: true in your dsPatterns (store).
like image 73
Abdel Raoof Olakara Avatar answered Oct 30 '22 23:10

Abdel Raoof Olakara