Skip to content

Bug - Pagination - Default page renders negative first index #9165

@josemigallas

Description

@josemigallas

Describe the problem
When omitting prop page (default value is 0) the first index is (0 - 1) * perPage + 1; -> 1 - perPage a negative number.

How do you reproduce the problem?

<Pagination itemCount={25} />

Expected behavior
First index should be 0.

Is this issue blocking you?
Set `page={1}´.

Screenshots
image

What is your environment?
@patternfly/react-core@4.276.8

Any other information?
The existing Pagination snapshots already confirm this bug:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions