Skip to content

Avoid causing a loop when going back after changing the page size

Erwan Rouchet requested to merge fix-page-size-handling into master

Refs #1194

This does not close the issue as this only fixes the first half of it. Still better than nothing… This works by allowing the store's page size to change from the URL's page_size at any time, even when the store already has a defined navigationPageSize.

The other half requires rewriting the way we handle page sizes entirely due to a race condition: Vue 3's way of calling watchers makes it so we have no way to tell that the page and page_size have both simultaneously changed due to pressing the Back button, and the page watcher gets called first, causing the page_size watcher to then redirect to insane page numbers as it believes we had started from &page=4&page_size=500 and not just &page=4 (which implies &page_size=20).

Merge request reports

Loading