-
Notifications
You must be signed in to change notification settings - Fork 829
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
[EuiBasicTable] shows no items if all items of last page is deleted #3422
Comments
What should be the desired behavior, should the user be redirected to the previous page or the first page? |
That's a good question. @thompsongl what are your thoughts? On one hand, basic table could detect an out-of-bounds page and call onChange to move it to the last one; on the other, the app itself owns paginated and we could say it's up to it (and the example) to ensure correct pagination data. |
At the very least, it appears to be an error that the pagination bar becomes hidden in this scenario. I think we could go just a bit further and detect the out-of-bounds page and move to the actual last page. |
Via the callback (make the application update and fix the problem), or just ignore the invalid input at that point and clamp to the valid page range? (< 0 becomes 0, > MAX becomes MAX) |
Clamp to the valid page range. Seems like pagination_bar could detect when pageIndex > pageCount (which is not part of parent state) and use the |
Thanks!
Good observation @ashikmeerankutty does that make sense? |
@chandlerprall I think I got it. I will make a PR for the same. 👍 |
In EuiBasicTable if all items on the last page are deleted. The table shows no Items found.
The text was updated successfully, but these errors were encountered: