Esri / calcite-design-system

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

Pagination: becomes broken when it is placed inside a flex container. #8942

Open vannizhang opened 3 months ago

vannizhang commented 3 months ago

Check existing issues

Actual Behavior

The calcite-pagination component becomes broken when I have it placed inside of flex container (a div element that has display set to flex).

Here is what is an example of what I see:

image

Expected Behavior

It should just render as what we see from the example of the doc:

image

Reproduction Sample

https://codepen.io/vannizhang/pen/abxmKxV

Reproduction Steps

  1. Open the codepen link that I provided above.
  2. You should see two calcite-pagination components there.
  3. The first one looks broken as it it placed inside a flex container.

Reproduction Version

2.6.0

Relevant Info

Windows 10. Chrome 122.

Regression?

1.4.3

Priority impact

p2 - want for current milestone

Impact

Several pages of the the Living Atlas Website uses this component:

image

Calcite package

Esri team

ArcGIS Living Atlas

macandcheese commented 3 months ago

As a workaround you can set width: 100% on the Pagination element: https://codepen.io/mac_and_cheese/pen/XWQNrMd

geospatialem commented 3 months ago

Related: https://github.com/Esri/calcite-design-system/issues/8420

gpbmike commented 1 month ago

Does anyone have a way to horizontally center the pagination while using the full container width?

edit: n/m it looks like justify-content: center; does the trick.