Premium support for our pure JavaScript UI components


Post by Nualis »

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).

bryntum_state.webm
(13.48 MiB) Downloaded 46 times

Regards,
Nualis


Post by alex.l »

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


Post by Nualis »

Hi Alex,

Just send an example project to Mats.

Regards,
Nualis


Post by alex.l »

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


Post by Nualis »

Hi Alex,

And did you also found the source of the filter issue?

Regards,

Nualis


Post by alex.l »

Yes, it's the same problem. A store has been loaded before your state applied.

All the best,
Alex


Post by alex.l »

Thanks for your note, I will add this to the ticket.

All the best,
Alex


Post by Nualis »

Hi Alex,

Thanks. If I remove the line

sortFeature: "name"

the grid is not loaded at all with records. The call to the back-end is executed.

Regards,

Nualis


Post by alex.l »

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


Post by Nualis »

Hi Alex,

We tried your solution with the

grid.store.load();

But the issue with the filtering is still there.

Any news when this issue will be resolved? We are holding back our product release due to this paging issue.

https://github.com/bryntum/support/issues/5572


Post Reply