spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

[Bug]: max-visible-items does not work when breadcrumb items are added dynamically

Open rickharris opened this issue 5 months ago • 0 comments

Code of conduct

  • [X] I agree to follow this project's code of conduct.

Impacted component(s)

sp-breadcrumbs

Expected behavior

When you render a breadcrumb that has less than max-visible-items breadcrumb items, and then adds more items, the breadcrumb should stop showing new breadcrumb items when it goes over max-visible-items.

Actual behavior

When you render a breadcrumb that has less than max-visible-items breadcrumb items, and then adds more items, all new breadcrumb items continue to be shown even if there are more than max-visible-items.

Screenshots

image

What browsers are you seeing the problem in?

Chrome

How can we reproduce this issue?

  1. Go to https://studio.webcomponents.dev/edit/3J5UCfXUj2WIngjxPlYI/src/index.ts?p=stories
  2. Click on "add breadcrumb item" multiple times
  3. After there are more than four items, notice that none of the breadcrumb items are hidden, they are all visible.

Sample code or abstract reproduction which illustrates the problem

https://studio.webcomponents.dev/edit/3J5UCfXUj2WIngjxPlYI/src/index.ts?p=stories

Severity

SEV 4

Logs taken while reproducing problem

No response

rickharris avatar Sep 09 '24 20:09 rickharris