Skip to content

[Bug]: Pagination doesn't work with a default value for page #20265

@desean1625

Description

@desean1625

Package

@carbon/web-components

Browser

Chrome

Package version

2.36.0

React version

No response

Description

Creating a pagination element with page set to anything except 1 causes the page select to not be accurate.

<cds-pagination backward-text="Previous page" forward-text="Next page" items-per-page-text="Items per page:" page="5" page-size="10" size="sm" total-items="103">
  <cds-select-item value="10">10</cds-select-item>
</cds-pagination>
Image

Reproduction/example

https://stackblitz.com/edit/github-w5ayr5dd?file=index.html,src%2Findex.js,package.json

Steps to reproduce

Easiest way to reproduce is open devtools edit an element as html and paste the following

<cds-pagination backward-text="Previous page" forward-text="Next page" items-per-page-text="Items per page:" page="5" page-size="10" size="sm" total-items="103">
  <cds-select-item value="10">10</cds-select-item>
</cds-pagination>

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

Metadata

Metadata

Assignees

Type

Projects

Status

🚦 In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions