spectrum-web-components
spectrum-web-components copied to clipboard
[Bug]: max-visible-items does not work when breadcrumb items are added dynamically
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
What browsers are you seeing the problem in?
Chrome
How can we reproduce this issue?
- Go to https://studio.webcomponents.dev/edit/3J5UCfXUj2WIngjxPlYI/src/index.ts?p=stories
- Click on "add breadcrumb item" multiple times
- 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