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

[Bug]: Picker should display value of (delayed) rendered selected menu-item

Open spdev3000 opened this issue 10 months ago • 1 comments

Code of conduct

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

Impacted component(s)

Picker

Expected behavior

When an sp-picker is rendered with a given value that belongs to a (delayed) rendered slotted menu-item - the default label should display the value of the selected sp-menu-item.

Actual behavior

When a value is provided to sp-picker and the related menu-item (with same value) is rendered later and slotted into the picker - the default displayed label is not updated and doesn't reflect the related menu-item. Also the menu-item is not selected.

Screenshots

No response

What browsers are you seeing the problem in?

Chrome, Safari, Firefox, Microsoft Edge

How can we reproduce this issue?

  1. Go to https://studio.webcomponents.dev/edit/8b7MDkRa40AcxvOGUUi2/src/index.ts?p=stories
  2. The items will be rendered after 1000ms into the picker component, while the value is already set
  3. If you open the picker, no menu-item is selected

Sample code or abstract reproduction which illustrates the problem

No response

Severity

SEV 3

Logs taken while reproducing problem

No response

spdev3000 avatar Apr 23 '25 18:04 spdev3000

SWC-835

najikahalsema avatar Apr 24 '25 16:04 najikahalsema