PDA

View Full Version : Grid Panel table duplicating rows on display



rtomasso
10 Nov 2016, 7:49 AM
I have an issue with a customer seeing duplicated rows on a search result being displayed with ExtJS grid table.

I confirmed there is no duplicated data. I do not see this duplication problem when using a different table-builder component. The problem is happening within the innards of the ExtJS code building the table.

The component builds the grid table with this:
var grid_store_config = { model: 'gridStoreModel', data : JSONified search results, ... };
var grid_store = Ext.create('Ext.data.Store', grid_store_config );
var config = { store: grid_store, ... };
grid = Ext.create('Ext.grid.Panel', config);

The results go into the data element of grid_store_config as JSON data. I did a dump of this after creating grid_store and there are no duplicates.

The user can't edit or modify the contents of this table, it is just for display. Customer runs a search query and somehow sees a duplicated row here and there in the table every few queries. The data is pre-sorted so nothing has to be done, just loop over the data and display each row in sequence. This is not a consistent issue, rerunning the same query sometimes works fine, then run it again and a different duplicated row will appear. It's not a case of overloading the grid_store, I see it with as few as 80 rows.