Skip to content

Value of select not updated when option list is changed #5656

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

Closed
OskarPersson opened this issue Nov 8, 2020 · 2 comments
Closed

Value of select not updated when option list is changed #5656

OskarPersson opened this issue Nov 8, 2020 · 2 comments

Comments

@OskarPersson
Copy link

OskarPersson commented Nov 8, 2020

Describe the bug
Bound select value is not updated when the option list is updated.

To Reproduce
See REPL here and switch first select value twice and try to select "a" in the other one. Going from "first" to "second" should also select "b"

Expected behavior
Updating the list of options should change the value of the select to a value available in the new list

Information about your Svelte project:

  • Your browser and the version: Chrome 86.0.4240.183

  • Your operating system: Windows 10

  • Svelte version: 3.29.4

  • Whether your project uses Webpack or Rollup: Webpack

Severity
How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of Svelte entirely?

Annoying, might have some workaround

Possibly related issues

@zyxd
Copy link

zyxd commented Nov 9, 2020

Hello. How about this solution? https://svelte.dev/repl/2ededb1729df464299370679bb9b614a?version=3.29.4

@OskarPersson
Copy link
Author

That works great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants