-
Notifications
You must be signed in to change notification settings - Fork 412
Fix search pagination in list messages #2177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Bound pageIndex to valid range based on filtered results so searching while on page 2+ shows results instead of empty page. The original pageIndex is preserved so clearing the search returns to the same page.
|
|
||
| // Message Table rendering variables and functions | ||
| // Bound pageIndex to valid range based on filtered results | ||
| const totalPages = Math.max(1, Math.ceil(filteredMessages.length / pageSize)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't there some util function for this already?, if not shouldn't there be some?
|
@claude review |
|
Claude finished @malinskibeniamin's task in 1m 23s —— View job Code Review
|

Summary
Fixes an issue where searching/filtering messages while on page 2+ would show no results because the pagination index exceeded the filtered result set.
Changes
pageIndexto valid range based on filtered results countpageIndexstate so clearing the search returns to the same pageTest plan