Skip to content
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

Mutating state when using bind:value together with multiple prop does not update the component in some cases #276

Closed
jochienabuurs opened this issue Jan 13, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@jochienabuurs
Copy link

Possibly related to #272

I've expanded the REPL to showcase the behavior.

https://svelte.dev/playground/7d57062c8ca24dd589e486f38eec92ef?version=5.14.2

The clear button works as expected now.
But I would expect the selected options to be updated when pressing the "remove option 3" button.
The state gets updated but the svelecte UI does not reflect that.

Am I missing something here?

@jochienabuurs
Copy link
Author

When i disable the following line, it works. Not sure why it's there though...

if (fetch_initValue && (Array.isArray(fetch_initValue) ? fetch_initValue.length : true)) return;

@mskocik mskocik added the bug Something isn't working label Jan 13, 2025
@mskocik
Copy link
Owner

mskocik commented Jan 13, 2025

You're right, that line caused early exit. But the root cause was somewhere else.

@jochienabuurs
Copy link
Author

Yeah, that's what I was thinking too.

Thanks for fixing it on such short notice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants