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?

1
  • Can you produce a fiddle (fiddle.sencha.com) that demonstrates the problem? We really need to see the code and event handlers to see what's going on. Dec 4, 2019 at 12:18

2 Answers 2

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

1
  • 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, 2020 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.