GovAlta / ui-components

ui-components contains the code you need to start building a user interface for Government of Alberta platforms and services.
Apache License 2.0
14 stars 24 forks source link

Pagination: component breaks if you change items per page #1529

Closed ArakTaiRoth closed 1 month ago

ArakTaiRoth commented 8 months ago

Info

If you look at our current Items per page example for the Pagination component and actually use it. You'll notice that if you're on the last page, and then change the # of items to show per page, the component soft breaks. As in the # of pages goes down, but the page you're on doesn't change, so no items are actually shown because you're now on a page that doesn't exist.

Other Info

This was recorded back when we had this example in Storybook. We don't have this example at this moment, please refer to #1680 for the code for an example.

Acceptance Criteria:

  1. Current page should change to first page if items per page is changed
ArakTaiRoth commented 2 months ago

Review this story once #1680 is finished, this story might be a non-issue, if the issue is just documentation only.

syedszeeshan commented 1 month ago

PR #1997 should fix this issue also.