Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination with zero total-items shows 0 as first page #10275

Open
2 of 6 tasks
nwhittaker opened this issue Sep 11, 2024 · 1 comment
Open
2 of 6 tasks

Pagination with zero total-items shows 0 as first page #10275

nwhittaker opened this issue Sep 11, 2024 · 1 comment
Labels
0 - new New issues that need assignment. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 3 A day or two of work, likely requires updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. p - low Issue is non core or affecting less that 10% of people using the library

Comments

@nwhittaker
Copy link
Contributor

nwhittaker commented Sep 11, 2024

Check existing issues

Actual Behavior

Screenshot 2024-09-11 at 4 30 10 PM

Given a <calcite-pagination> element with zero totalItems, the page button shows 0 and is not selected by default.

Screenshot 2024-09-11 at 4 49 17 PM

Interestingly, at very narrow viewport widths, the 1 button appears along with arrow buttons which can be used to fast forward to the 0 button.

Expected Behavior

Screenshot 2024-09-11 at 4 30 18 PM

The page button shows 1 and is selected by default.

Screenshot 2024-09-11 at 4 51 42 PM

It is not possible to navigate to the 0 button at narrow viewport widths.

Reproduction Sample

https://codepen.io/nwhittaker-esri/pen/OJeqqyQ

Reproduction Steps

  1. Visit the repro and compare with the expected vs. actual behavior at standard and narrow viewport widths.

Reproduction Version

2.12.2

Relevant Info

No response

Regression?

No response

Priority impact

impact - p2 - want for an upcoming milestone

Impact

Extra consideration is required by the consumer to ensure the pagination component displays an empty state seamlessly.

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Field Apps

@nwhittaker nwhittaker added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Sep 11, 2024
@github-actions github-actions bot added ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. calcite-components Issues specific to the @esri/calcite-components package. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone labels Sep 11, 2024
@geospatialem geospatialem added p - low Issue is non core or affecting less that 10% of people using the library estimate - 3 A day or two of work, likely requires updates to tests. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed needs triage Planning workflow - pending design/dev review. labels Sep 16, 2024
@geospatialem
Copy link
Member

Consider if effort could be linked to #10276.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 3 A day or two of work, likely requires updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. p - low Issue is non core or affecting less that 10% of people using the library
Projects
None yet
Development

No branches or pull requests

2 participants