svelteuidev / svelteui

SvelteUI Monorepo
https://svelteui.dev
MIT License
1.26k stars 62 forks source link

Unable to set Accordion currently selected through {value} bindings #493

Closed albert-sun closed 2 months ago

albert-sun commented 2 months ago

What package has an issue

@svelteuidev/core

A clear and concise description of what the bug is

Setting an Accordion's bound value doesn't reflect the change, i.e. the currently selected Accordion item doesn't change. The documentation is fairly vague about controlling the Accordion itself without any example, only saying "The accordion component can be controlled externally with the prop value (which can be binded) and with the on:change event".

In which browser(s) did the problem occur?

Chrome

Steps To Reproduce

  1. Navigate to the CodeSandbox issue here
  2. The currently selected value is "apple". Press the button to change the value to "banana".
  3. The text updates to show the current selection as "banana", but the selected Accordion item doesn't change.

Will look into the underlying code and investigate a fix, though with 1.0.0 around the corner I might contribute there instead.

Do you know how to fix the issue

No

Are you willing to participate in fixing this issue and create a pull request with the fix

Yes

Relevant Assets

No response

BeeMargarida commented 2 months ago

Fixed in latest patch 0.15.6