Pagination state to be available through redux store
See original GitHub issueIs your feature request related to a problem? Please describe.
I’m currently trying to style the Search block and I need to be able to list the current range of (e.g. Showing results 25-50 of 73
). In order to calculate this when using pagination, I need access to the current page, but this is all stored as local state within the listing block:
https://github.com/plone/volto/blob/28db44608718fbb579a2baccd2628e9368066e02/src/components/manage/Blocks/Listing/withQuerystringResults.jsx#L40 https://github.com/plone/volto/blob/master/src/helpers/Utils/usePagination.js
It would be nice if the currently selected page were available through redux, so this calculation could be done. There may be other places this data could be useful too? . Describe the solution you’d like When the pagination component causes a page change, for the current page to be available in the global redux store
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
@JeffersonBledsoe No, I think special API for this is not needed.
@JeffersonBledsoe I presume that you’re adding this as a new component? Or shadowing one of the existing Search block sub-components? My proposal would be to pass the pagination numbers to the subcomponent, from the main block. Maybe a PR is needed for that.