Fix page set to 1 on every edit #201

Merged
hdavidethan merged 2 commits from dchwang/table-pagination-fix into main 2023-02-25 18:24:09 +00:00
hdavidethan commented 2023-02-23 05:07:28 +00:00 (Migrated from github.com)

Description

Fix issue where the page resets to 1st page whenever an item is edited.

The current behavior is as follows: the page will stay the same unless there are no more items to show on the current page, in which case the page is set to the previous page (except when on the 1st page).

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  1. Tested when at the last page and removed all items until none on the page are left.
  2. Tested when at the first page.
  3. Tested when an item is removed from a random page.
# Description <!-- Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change. --> Fix issue where the page resets to 1st page whenever an item is edited. The current behavior is as follows: the page will stay the same unless there are no more items to show on the current page, in which case the page is set to the previous page (except when on the 1st page). ## Type of change <!-- Please delete options that are not relevant. --> - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update # How Has This Been Tested? <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> 1. Tested when at the last page and removed all items until none on the page are left. 2. Tested when at the first page. 3. Tested when an item is removed from a random page.
michellejli77 (Migrated from github.com) approved these changes 2023-02-24 16:45:43 +00:00
michellejli77 (Migrated from github.com) left a comment

other than lint stuff, lgtm!

other than lint stuff, lgtm!
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ScottyLabs/lost-and-found!201
No description provided.