Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

159
Vistas
Strange behavior of Ext.JS stores with paging and grids

I had some strange behavior of the stores in ext.js, when I was working with grids and with pagination. Problem: I have a grid, a store with pagination is attached to it. When removing a row from the grid, the row from the next page does not get to the current one. I tried reload store, commitChanges(), refresh(), pagingToolbar.doRefresh() and other things, but i just get the deleted row back into the grid.

I have Ext.JS 5.1.0.107.

I've reproduced this bug on Sencha's fiddle so you can see live example: https://fiddle.sencha.com/#fiddle/3ia0

Source code of reproducing the problem:

var store = Ext.create('Ext.data.Store', {
    fields: ['name', 'email', 'phone'],
    pageSize: 5,
    proxy: {
        enablePaging: true,
        type: 'memory'
    },
    data: [{
        name: 'Lisa 1',
        email: 'lisa@simpsons.com',
        phone: '555-111-1224'
    }, {
        name: 'Bart 2',
        email: 'bart@simpsons.com',
        phone: '555-222-1234'
    }, {
        name: 'Homer 3',
        email: 'homer@simpsons.com',
        phone: '555-222-1244'
    }, {
        name: 'Marge 4',
        email: 'marge@simpsons.com',
        phone: '555-222-1254'
    }, {
        name: 'Bart 5',
        email: 'bart@simpsons.com',
        phone: '555-222-1234'
    }, {
        name: 'Homer 6',
        email: 'homer@simpsons.com',
        phone: '555-222-1244'
    }, {
        name: 'Marge 7',
        email: 'marge@simpsons.com',
        phone: '555-222-1254'
    }]
});

var grid = Ext.create('Ext.grid.Panel', {
    title: 'Simpsons',
    store: store,
    columns: [{
        text: 'Name',
        dataIndex: 'name'
    }, {
        text: 'Email',
        dataIndex: 'email',
        flex: 1
    }, {
        text: 'Phone',
        dataIndex: 'phone'
    }, {
        xtype: 'actioncolumn',
        text: 'delete',
        width: 50,
        items: [{
            icon: 'https://img.icons8.com/material-outlined/72/filled-trash.png',
            tooltip: 'Delete',
            handler: function (_, rowIndex) {
                var elem = grid.getStore().getAt(rowIndex);
                grid.getStore().remove(elem);
                grid.dockedItems.getAt(2).doRefresh();
            }
        }]
    }],
    height: 500,
    width: 500,
    renderTo: Ext.getBody(),
    dockedItems: [{
        xtype: 'pagingtoolbar',
        reference: 'pagingToolbar',
        displayMsg: '',
        flex: 1,
        store: store,
        dock: 'bottom'
    }]
});
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda