Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
290 stars 75 forks source link

Navigating pagination with `0` total items computes negative `startItem` #10276

Open nwhittaker opened 2 months ago

nwhittaker commented 2 months ago

Check existing issues

Actual Behavior

Given a element with zero totalItems, clicking the page button computes a new startItem equal to pageSize - 1.

Screenshot 2024-09-11 at 4 43 23 PM

Expected Behavior

Clicking the page button does not change the startItem or resets it to 1.

Screenshot 2024-09-11 at 4 44 38 PM

Reproduction Sample

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

Reproduction Steps

  1. Visit the repro and inspect the pagination component in the browser's devtools.
  2. Click the pagination component's 0 button and observe its start-item attribute changes.

Reproduction Version

2.12.2

Relevant Info

Possibly superseded, or made moot by, https://github.com/Esri/calcite-design-system/issues/10275.

Regression?

No response

Priority impact

impact - p2 - want for an upcoming milestone

Impact

Adds complexity to consumers by requiring them to externally track and share the corrected pagination state if they need page changes to be atomic.

Calcite package

Esri team

ArcGIS Field Apps

geospatialem commented 2 months ago

Possibly related to a fix for https://github.com/Esri/calcite-design-system/issues/10275.