PDA

View Full Version : LoadMask in Grid not working after reconfigure



ktp
20 Sep 2007, 7:32 AM
Hi folks!

Calling reconfigure() on a grid should also recreate the LoadMask if loadmask is set to true.
I'm using Ext 1.1.1 and the grid doesn't show the LoadMask if reconfigured.
If I call reconfigure() again with initial DataStore and ColumnModel the LoadMask works like expected.

I found that others are experiencing the same issue:
http://extjs.com/forum/showthread.php?t=9293&highlight=loadmask+reconfigure

Any advice on this?

Sincerely yours, ktp.

FritFrut
31 Oct 2007, 2:56 AM
I believe that Grid.reconfigure should call Ext.applyIf, instead of Ext.apply.
Here's a fix that seems to work for me.
In Grid.reconfigure:

if(this.loadMask)
{
this.loadMask.destroy();
// this.loadMask = new Ext.LoadMask(this.container, Ext.apply({store:dataSource}, this.loadMask));
this.loadMask = new Ext.LoadMask(this.container, Ext.applyIf({store:dataSource}, this.loadMask)) ;
}

hendricd
31 Oct 2007, 4:18 AM
@FritFrut - Your right, I believe that's a bug, nice catch.~o)