加载出现时,我点击组合框,如何避免? [英] Loading appears when I click on combobox, how to avoid it?

查看:179
本文介绍了加载出现时,我点击组合框,如何避免?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个组合框,当我点击第二个组合框,加载出现,它保持在那里,直到我点击列表项。我不想加载出现在第二个组合。



我有2个组合框,当我点击第二个组合框,加载出现,它保持在那里,直到我点击列表项。我不想加载出现在第二个组合。

  var UnitPanel = Ext.create('Ext.panel.Panel',{
itemId:'dsUnitPanel'
border:0,
items:[UnitGrid,{
xtype:'combobox',
tpl:'< tpl for =。>< div class = x-boundlist-item> {name} [{freeSize} GB Free]< / div>< / tpl>',
style:'margin:10px;',
fieldLabel: 'a Group(*)',
editable:false,
bodyStyle:'padding-left:10px;',
store:dsAStore,
valueField:'name',
displayField:'name',
// forceSelection:true,
multiSelect:false,
name:'txtMode',
id:'dsVolumeGroupId',
queryMode:'local',
triggerAction:'all',
emptyText: 'select A Group',
listeners:{
select:function(combo,record,index){

this.getStore()。each(function(r){

if(combo.getValue()== r.data ['name'])
{
selectedDsVg = combo.getValue();
selectedDsVgFreeSize = r.data ['freeSize'];
}
});

},

'focus':function()
{

if(selectedDsWizardIndex == null)
{
Ext.MessageBox.alert('Error','请至少选择一个数组',function(){
enableTabIndexing();
});

}
}

}
},
{
xtype:'combobox',
style: 'margin:10px;',
fieldLabel:'B Group(*)',
editable:false,
bodyStyle:'padding-left:10px;',
loadMask:
存储:BGroupStore,
valueField:'value',
displayField:'name',
multiSelect:false,
name:'dsBGroupId',
id:'dsBGroupId',
queryMode:'local',
triggerAction:'all',
// disabled:true,
emptyText:'选择B组'
listeners:{
select:function(combo,record,index){

/ /store.on('load',function(){this.getPicker()。setLoading(false); }, 这个);
this.getStore()。loadMask.hide();
this.getStore()。each(function(r){

if(combo.getValue()== r.data ['value'])
{
alert('Select');
bGroupName = r.data ['name'];
}
});

},

'focus':function()
{
if(selectedDsWizardIndex == null)
{
Ext.MessageBox.alert('Error','请选择至少一个',function(){
enableTabIndexing();
});

}
}


}
}

请注意。

解决方案

您应该定义一个listConfig,如:



listConfig:{
loadingText:null,
loadMask:false
}


I have 2 combobox, when i click on second combobox the loading appears and it remain there till I click on list item. I dont want loading to appear on second combo.

I have 2 combobox, when i click on second combobox the loading appears and it remain there till I click on list item. I dont want loading to appear on second combo.

var UnitPanel = Ext.create('Ext.panel.Panel', {
                itemId:'dsUnitPanel',
                border:0,
                items:[UnitGrid,{
                xtype:'combobox',
                tpl: '<tpl for="."><div class="x-boundlist-item" >{name} [{freeSize} GB Free] </div></tpl>',
                style:'margin:10px;',
                fieldLabel: 'A Group(*)',
                editable:false,
                bodyStyle:'padding-left:10px;',
                store: dsAStore,
                valueField:'name',
                displayField:'name',
                //forceSelection: true,
                multiSelect: false,
                name: 'txtMode',
                id:'dsVolumeGroupId',
                queryMode: 'local',
                triggerAction: 'all',
                emptyText:'Select A Group', 
                listeners: {                
                    select: function(combo, record, index) {    

                     this.getStore().each(function(r){                  

                         if(combo.getValue() == r.data['name'])
                         {
                            selectedDsVg = combo.getValue();
                            selectedDsVgFreeSize = r.data['freeSize'];                                              
                         }
                     });

                  } ,

                  'focus':function()
                  { 

                     if(selectedDsWizardIndex == null)
                     {
                         Ext.MessageBox.alert('Error', 'Please select at least one Array',function(){
                                enableTabIndexing();
                             });    

                     }
                  }

                }
            },
            {
                xtype:'combobox',
                style:'margin:10px;',
                fieldLabel: 'B Group(*)',
                editable:false,
                bodyStyle:'padding-left:10px;',
                loadMask: false,
                store: BGroupStore,
                valueField:'value',
                displayField:'name',
                multiSelect: false,
                name: 'dsBGroupId',
                id:'dsBGroupId',
                queryMode: 'local',
                triggerAction: 'all',
                //disabled:true,
                emptyText:'Select B Group', 
                listeners: {                
                    select: function(combo, record, index) {    

                        //store.on('load', function () { this.getPicker().setLoading(false); }, this);
                        this.getStore().loadMask.hide();
                     this.getStore().each(function(r){                  

                         if(combo.getValue() == r.data['value'])
                         {
                             alert('Select');
                            bGroupName = r.data['name'];                                                    
                         }
                     });

                  },

                  'focus':function()
                  {           
                     if(selectedDsWizardIndex == null)
                     {
                         Ext.MessageBox.alert('Error', 'Please select at least one',function(){
                                enableTabIndexing();
                             });    

                     }
                  }


                }
            }

Please suggest.

解决方案

You should define a listConfig like:

listConfig: { loadingText: null, loadMask: false }

这篇关于加载出现时,我点击组合框,如何避免?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆