inveniosoftware / react-searchkit

React component library for interacting with a REST API.
https://inveniosoftware.github.io/react-searchkit/
MIT License
78 stars 40 forks source link

pagination: fix negative page numbers on empty query #276

Open Samk13 opened 4 days ago

Samk13 commented 4 days ago

:heart: Thank you for your contribution!

Description

the original symptom is that the initial value in the Redux store starts at -1. Changing it resolves the problem, but I am concerned that other logic might rely on the init value, potentially causing other issues. Therefore, I limited my change to this component!

Before:

Screencast from 2024-05-28 16:07:46.webm

After

test-pagination-4

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Frontend

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.