josei February 2016

Grid loadMask malfunction.Set loadMask target config

The grid loadMask has some problems.

LoadMask:true does not work.

If I choose to do as follows:

viewConfig: {
  loadMask: {msg: 'Loading records ...'}
}

It works but the mask only covers the grid body, excluding toolbares.

I tried maskElement: 'el' but did not work.

I do not intend to use setLoading ().

One solution might be target to my grid:

viewConfig: {
     loadMask: {msg: 'Loading records ...', target: this} 
 }

But target: this does not work.

Any idea how to get and set grid reference in the config target?

Answers


Alexander February 2016

You would have to override the createMask function of AbstractView.

Ext.define('Test',{
    override:'Ext.view.AbstractView',
    privates:{
        createMask:function(mask) {
            if(this.ownerCt) {
                if(!Ext.isObject(mask)) mask = {target:this.ownerCt};
                else if(!mask.target) mask.target = this.ownerCt;
            }
            this.callParent(arguments);
        }
    }
});

Fiddle

Post Status

Asked in February 2016
Viewed 3,410 times
Voted 8
Answered 1 times

Search




Leave an answer