加载标签放在extjs组合框上

时间:2012-10-10 20:23:33

标签: javascript jquery extjs

我有一个ext.data.store和Ext.form.field.ComboBox。该商店每5秒从php重新加载一次新数据。我得到的问题是,当我按下组合框并且加载新数据时,显示预加载器的加载标签是位置或左上角或组合框后面或屏幕中间的某处如果我移动组合窗口。

我该如何解决这个问题或我做错了什么?

以下是示例代码:

Ext.define('MyModel', {
extend: 'Ext.data.Model',
fields: [
    {name: 'id',  type: 'string'},
    {name: 'type',   type: 'int'},
    {name: 'myarray', type: 'auto'}
],

});

var myStore = new Ext.data.Store({
model: 'MyModel',
proxy: {
    type: 'ajax',
    url : '/users.json',
    reader: {
        type: 'json',
        root: 'MyModel'
    }
},
autoLoad: true
});

var createCombo = function(){
// Create the combo box, attached to the states data store
Ext.create('Ext.form.ComboBox', {
    fieldLabel: 'Choose State',
    store: myStore ,
    queryMode: 'remote',
    displayField: 'type',
    valueField: 'id'
});

}

createCombo ();

我将此代码作为我在开发中使用的代码。它运作良好,但加载标签放错地方

0 个答案:

没有答案
相关问题