grid loadmask won't disappear while using PagingMemoryProxy

751 Views Asked by At

I am trying to create a grid with store having PagingMemoryProxy.
Pagination is working and I can see as well as change all pages
but the loadmask won't disappear so I am not able to edit the grid data.

here is my code

 Ext.require('Ext.ux.data.PagingMemoryProxy');
 var data = {
    Accounts: [{
        id: 1,
        name: 'Ed Spencer'
    }, {
        id: 2,
        name: 'Abe Elias'
    }, {
        id: 3,
        name: 'Tom Elias'
    }]
};

Ext.define('Account', {
    extend: 'Ext.data.Model',
    fields: [{
        name: 'id',
        type: 'string'
    }, {
        name: 'name',
        type: 'string'
    }]
});

var store = Ext.create('Ext.data.Store', {
    storeId: 'myStore',
    pageSize: 2,
    model: 'Account',
    data : data,
    proxy: {
        type: 'pagingmemory',
        reader: {
            type: 'json',
            root: 'Accounts'
        }
    },
});

var pagingBar = new Ext.PagingToolbar({
    store: store,
    displayInfo: true,
    displayMsg: 'Displaying Accounts {0} - {1} of {2}',
    emptyMsg: "No Accounts to display"
});

var grid = new Ext.create('Ext.grid.Panel', {
    title: 'Accounts',
    store: store,
    columns: [{
        header: 'Id',
        dataIndex: 'id',
        editor: 'textfield'
    }, {
        header: 'Name',
        dataIndex: 'name',
        flex: 1,
        editor: {
            xtype: 'textfield',
            allowBlank: false
        }
    }],
    plugins: [
    Ext.create('Ext.grid.plugin.RowEditing', {
        clicksToEdit: 1,
        pluginId: 'rowEditing'
    })],
    height: 200,
    width: 400,
    loadMask: false,
    renderTo: "editor-grid",
    bbar: pagingBar
});

Store load event is getting fired and I can see greyed out data behind the loading mask
Firbug is showing no error. I am using Extjs 4.1.3.
Any idea what's the problem.

Thanks in advance

1

There are 1 best solutions below

0
On BEST ANSWER

Looks like a known bug, think its fixed in Extjs 4.2.1

As a temporary fix, you can hide the mask 'on store load' using

grid.getView().setLoading(false);

Sample here : https://fiddle.sencha.com/#fiddle/1v9