question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pagination state to be available through redux store

See original GitHub issue

Is 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:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tiberiuichimcommented, Aug 1, 2022

@JeffersonBledsoe No, I think special API for this is not needed.

1reaction
tiberiuichimcommented, Jul 18, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pagination | Redux Toolkit
If a specific entity is deleted that falls on an earlier page, the paginated query will not be providing a tag for that...
Read more >
React Redux Pagination - Stack Overflow
In the Case One: Im doing a simple server-side pagination in rails and using react as front-end and redux as my state management....
Read more >
Working with paginated API in redux | Spotlight On JavaScript
A page is just an object with a list of todos ids and a boolean indicating whether this particular page is being fetch...
Read more >
Implementing Pagination with React & Redux PRO - Thinkster.io
In this tutorial we'll demystify how to properly handle pagination of data with Redux, which can often be a bit tricky.
Read more >
Implement Search, Sort, Filter and Pagination in React Redux
In this video, we are going to implement Search, Sort, Filter and Pagination functionality with Redux Saga in React using JSON fake server....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found