0

My extjs version is 6.5,I created a treepanel and GridPanel. When I click the record in GridPanel, the treeStore of treepanel will be triggered to load data. If I click the first record, TreeStore will load more data and slow down, but I have already clicked the second record. At the same time, the second click request has responded. As a result, treepanel will render the response data of the first click.

Ext.data.store does not have this problem. How can I solve this problem?

Dawesi
  • 568
  • 3
  • 9
huan.gao
  • 21
  • 4
  • Can you produce a fiddle (https://fiddle.sencha.com) that demonstrates the problem? We really need to see the code and event handlers to see what's going on. – Robert Watkins Dec 04 '19 at 12:18

2 Answers2

0

You can listen to the load event on the treestore https://docs.sencha.com/extjs/6.5.3/modern/Ext.data.Store.html#event-load

and toggle grid.disableSelection(true); based on selection state https://docs.sencha.com/extjs/6.5.3/modern/Ext.grid.Grid.html#cfg-disableSelection

Dawesi
  • 568
  • 3
  • 9
  • yes, I listen to the grid beforeselect event, when the isLoading method of treestore return true, return false to stop the grid's select event – huan.gao Jan 11 '20 at 12:51
0

Do not do more than one load request at once. mask the grid on click and unmask it, when the store is loaded.

cp-hb
  • 73
  • 4