carbon-design-system / carbon-components-svelte

Svelte implementation of the Carbon Design System
https://svelte.carbondesignsystem.com
Apache License 2.0
2.71k stars 261 forks source link

MultiSelect cannot clear selectedIds set in onMount() #1831

Closed keehun closed 1 year ago

keehun commented 1 year ago

When setting an initial selectedIds within onMount() for a MultiSelect, the "clear" button does not work until the MultiSelect is "interacted with" in some way (show the items, type something into the box, etc).

Here is a repro: https://svelte.dev/repl/63e6f961f6b1483fab1eac28da08c011?version=4.2.2

I will submit a PR to fix this.