graylog2-server
graylog2-server copied to clipboard
Pagination state saved as query parameter
Description
Now all paginated lists are linkable with a query parameter so the page and pageSize states will not be lost when we navigate back and forth to it.
Note:
- In this PR the previous pagination solution (saved as react state) was replaced by query parameter solution.
- This feature is optional you can turn it off by setting "useQueryParameter" PaginatedList prop to false.
- "useQueryParameter" is set to false for pages with multiple PaginatedList.
- In this PR straightforward eslint issues were fixed the more complicated ones were just disabled.
Motivation and Context
https://github.com/Graylog2/graylog2-server/issues/12160 https://github.com/Graylog2/graylog2-server/issues/12499
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [x] Refactoring (non-breaking change)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the CONTRIBUTING document.
- [ ] I have added tests to cover my changes.
Hey @gally47,
Looks good so far!
But since some of the same files are introduced here as in PR https://github.com/Graylog2/graylog2-server/pull/12986, do you want to use fix-issue-12499 as a base branch here as long as it is not merged?
Some pages that use the PaginatedList component no longer work as expected. For example, in the Archives List (enterprise plugin). Both the search and the reset when a search has been performed lead to pages without content or without pagination elements.