Hi,
We are still working on the grid with AjaxStore. Loading the state of a server-side paginated grid breaks the grid if filtering is used (see video).
Regards,
Nualis
Hi Nualis,
Could you please share some configs to reproduce this? Do you see that problem in our PHP paged example https://bryntum.com/examples/grid/php-paged/
All the best,
Alex
Hi Nualis,
Thank you for your test case!
I checked your demo and found the problem.
When code stopped in your debugger inside applyStateHandler
method, I checked in consloe
grid.store.isLoading
and it returned true
. So store already loading data before your state applied.
But it shouldn't happened because you didn't use autoLoad : true
for a Grid.
After some investigation I found that using Sort
feature triggers initial sorting for the grid. In your case you use remote sorting, so calling initial sort will trigger data load before you applied state.
I've opened a ticket to investigate this moment, it doesn't look like proper behaviour even if we can clearly understand why it happened.
https://github.com/bryntum/support/issues/5572
For now, if you removed sortFeature : 'name'
line from your config, it will not load data before you applied your state.
All the best,
Alex
Hi Nuals,
All correct, you need to initiate store load by yourself when your configuration is applied.
grid.store.load();
https://bryntum.com/docs/grid/api/Core/data/AjaxStore#function-load
All the best,
Alex