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
Scale Version
v3.0.0-beta.117 (also present in newest version)
Framework and version
We are using the ReactComponents, however the issue is also present in the component template.
Current Behavior
When creating a pagination element, with 0 entries and, therefore, a start element with index 0, the default display of the pagination will display items "1 - 0 / 0". When trying to trick this by providing "-1" as the start index for the pagination, the previous page navigation button will be enabled.
Expected Behavior
When providing a total element count of "0" to the pagination, the pagination should display "0 - 0 / 0" and all navigation buttons should be disabled.
Scale Version
v3.0.0-beta.117 (also present in newest version)
Framework and version
We are using the ReactComponents, however the issue is also present in the component template.
Current Behavior
When creating a pagination element, with 0 entries and, therefore, a start element with index 0, the default display of the pagination will display items "1 - 0 / 0". When trying to trick this by providing "-1" as the start index for the pagination, the previous page navigation button will be enabled.
Expected Behavior
When providing a total element count of "0" to the pagination, the pagination should display "0 - 0 / 0" and all navigation buttons should be disabled.
Code Reproduction
<ScalePagination size="small" pageSize={5} onPagination={() => void} startElement={0} totalElements={0}/>
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
The problem lies within https://github.com/telekom/scale/blob/main/packages/components/src/components/pagination/pagination.tsx:
Modifying this to:
will resolve the issue.
The text was updated successfully, but these errors were encountered: