Question

In extjs 4.2.1, there is some problem with combobox. When drop down list appears, i need to scroll to selected value, not only highlight it. So if selected value is on bottom, scroll remains on top anyways. Here is my code:

Ext.define('FpoApp.store.exams.Courses', {
    extend: 'Ext.data.Store',
    model: 'FpoApp.model.Idname',
    proxy: {
        type: 'ajax',
        url: 'php/exams/getCourses.php',
        reader: {
            type: 'json',
            root: 'rows'
        }
    },
    autoLoad: true
});

Ext.create('Ext.form.field.ComboBox', {
    queryMode: 'local',
    editable: false,
    valueField: 'id',
    displayField: 'name',   
    store: 'exams.Courses' 
});

Also, it seems to work in extjs 3.4.0. Just found an example, where it works perfectly, just as i need. Here is example. Looks like basic comboboxes, nothing special. Have no idea what's wrong with 4.2.1. And yes, i'm using mvc.

Was it helpful?

Solution

This seems to be a bug in Ext JS 4.2.1 version. In Ext JS 4.2.0 version and also in the newest Ext JS 4.2.2 version the behavior is same as in Ext js 3.4.0

OTHER TIPS

I had a similar issue using Ext's 4.2.0 ComboBox. Turns out I was causing the issue by calling clearFilter() on my data store after loading data asynchronously. Removing this method call fixed my issue:

myComboBox.store.clearFilter()

http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.data.Store-method-clearFilter

So this isn't a direct answer to your question, but the moral of the story is to look at your Data.Store as closely as your ComboBox. This would have saved me a few hours of banging my head against the wall :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top