Skip to content

[Bug]: WC pagination component displaying an incorrect label when there are 0 items #19569

@zeyadomran

Description

@zeyadomran

Package

@carbon/web-components

Browser

No response

Package version

v2.27.2

React version

No response

Description

Displaying an incorrect label when there are 0 items

If we pass totalItems = 0 we expect the pagination component to say 0 - 0 of 0 items (what it says in carbon angular), however that is not what the web component implementation says. If we are on page = 0 then the component says -9 - 0 of 0 items and if page = 1 then it says 1 - 0 of 0 items.

Arrow button issue:

The buttons don't look the way they are supposed to when changing the size of the pagination component. I updated stackblitz to have that issue as well. The arrow buttons have a top and side border but no bottom border in the stackblitz example, and in our implementation, the left border does not reach all the way down to the bottom of the component.

Our implementation:
Image

On Stackblitz:
Image

Reproduction/example

https://stackblitz.com/edit/github-hduubrev?file=src%2FPagination.ts

Steps to reproduce

I created 2 examples, one with page = 0, and another with page = 1. Ideally it shouldn't matter and both should show 0 - 0 of 0 items

Suggested Severity

None

Application/PAL

No response

Code of Conduct

Metadata

Metadata

Assignees

Type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions