mi6 / mi6/ic-ui-kit

IcPaginationBar - Cannot use 'All' option along with custom ItemsPerPage

Open
#4,255 2 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
TypeScript
Stars
53
Forks
63
Avg merge
2d 4h
Merged PRs (30d)
15

Description

### Summary of the bug
When using IcPaginationBar along with a custom value for the 'itemsPerPageOptions' prop, the 'All' option does not appear in the 'Items per page' select, regardless of the value of the 'hideAllFromItemsPerPage' prop.

### 🪜 How to reproduce
Tell us the steps to reproduce the problem:
1. Go to page: https://design.sis.gov.uk/components/navigation/pagination-bar/code/#variants
2. Click on: The 'Items per page' select on the 'Show items per page control' example
3. See that there is no 'All' option

### 📸 Screenshots or code
Image

There is no 'All' option visible despite the 'hideAllFromItemsPerPage' prop being omitted.

### 🧐 Expected behaviour
The 'All' option should be visible in the 'Items per page' select

### 📝 Acceptance Criteria
Allow the 'All' option to be selectable in the 'Items per page' select
Add a cypress test for this case, and set all the skipped tests to be run.

Contributor guide

Open the contributing guide

Research direction

Start at the IcPaginationBar implementation and trace how itemsPerPageOptions and hideAllFromItemsPerPage determine the select options. Add a Cypress test covering a custom itemsPerPageOptions value with the All option visible and selectable, then enable the skipped tests and run the relevant Cypress coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
cypress, typescript
Domain
frontend, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.