You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @laurenmrice , I have few questions here should we even display pagination when total items is 0 ? And if yes, what should be the design spec for the same. What messages should we display ??
should we even display pagination when total items is 0 ?
@riddhybansal Yes, it should be an option to display it even with no items. This way consumers can avoid layout shift by keeping it in the DOM vs removing/re-adding to the DOM.
@tay1orjones@riddhybansal Yes, like Taylor said above we can keep the pagination there for now even when the total items is 0. Design has some website guidance discrepancies between our Empty state pattern and the Carbon for IBM Products Empty state component of when to display pagination for empty tables. But the products guidance is more up to date than ours and teams are currently using it this way so I think it is valid to keep it.
Package
@carbon/react
Browser
Chrome
Package version
1.58.0
React version
18.3.1
Description
Pagination control shows incorrect/invalid messaging when
totalItems=0
Currently it shows
1-{pageSize} items
for the current page itemsCurrently it show
_ of NaN pages
for the current pageReproduction/example
https://stackblitz.com/edit/github-1ithgj-5v2k2k?file=src%2FApp.tsx
Steps to reproduce
Load the Stackblitz and expand the preview window to a resolution that displays the full control
Suggested Severity
Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.
Application/PAL
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: