-
Notifications
You must be signed in to change notification settings - Fork 41
Reactive selected
prop
#136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for bringing this up and for the nice REPL repro. This is not intended behavior. I'm pretty sure this is a consequence of #123 which added an extra layer in between the Seriously though, it's too bad I haven't found a good way of testing 2-way binding yet which would have prevented this regression. |
Yes, this is the consequence of #123. I was also preparing a repro of this 😊.
Not sure if my svelte-component-test-recipes could help. |
Yeah, I was just rereading your two-way binding recipe. Very cool that it works but it would require two new dependencies. I might just go with a wrapper component that dispatches events for testing whenever the two-way bound variable changes. |
Maybe the best solution for regaining 2-way binding for The only problem with this is that you can't control |
Released in v8.0.0. I confirmed that installing
in your REPL fixes the issue. |
Uh oh!
There was an error while loading. Please reload this page.
I'm surprised to read in the docs that the
selected
prop is static ("[...] or passed as prop to set pre-selected options that will already be populated when the component mounts before any user interaction").In my case, the selected options depend on the external context, the URL params, and when I go back/forward the MultiSelect has to update in consequence.
This worked as I expect with version 6.1.0 but since version 7.1.0, the
selected
prop has become static (it does not take new values into account).Is this intended behavior?
As a workaround, I did use:
Here is a quick-made REPL to demonstrate this: https://svelte.dev/repl/153f9049a9b849aa9fcc95117061a867?version=3.52.0
The text was updated successfully, but these errors were encountered: