Comments (4)
i have no idea why the bug report formatting is broken, but here's the proper link: link
from svelte.
removing the selected condition has it behave normally in the repl, but it breaks in a sveltekit project. if you like, i can throw together a repo showing off the behavior
from svelte.
There are two problems with the code:
value
should be a stable reference. In your case, it becomes a new value everytime, which will break comparison- you're using both
bind:value
on the select and theselected
attribute. Remove theselected
attribute and your code works
Closing as this is not a bug within the framework
from svelte.
* `value` should be a stable reference. In your case, it becomes a new value everytime, which will break comparison
this actually led me to a slightly less horrible way of doing what i was trying to achieve, thanks!
* you're using both `bind:value` on the select and the `selected` attribute. Remove the `selected` attribute and your code works
i realized that after i posted the issue, actually, but yeah this most likely isn't a framework thing
from svelte.
Related Issues (20)
- Svelte 5: Changing of the items in #each block breaks order of the element HOT 1
- Using a generic type as an argument to a Snippet breaks types generation of a component HOT 4
- Svelte 5: Optimize reads to getters HOT 2
- Svelte 5: Unexpected character '@' when using *.svelte.ts with Decorators and $state and importing in client HOT 5
- Improve message for error "Nesting selectors can only be used inside a rule" HOT 5
- Svelte 5: Regression since 5.0.0-next.162 with #each or render HOT 2
- Svelte v4 components under Svelte v5: Internals leaked through slot variables when defined in component HOT 7
- Svelte 5 - Relax Variable Naming Restrictions on $-Prefixed Variables HOT 7
- Svelte 5: Components in #if blocks don't trigger their $effect rune HOT 9
- False positive error: rune outside svelte HOT 1
- Bump all dependencies before final release
- Documentation Clarification for Rookies HOT 3
- Svelte 5 (5.0.0-next.167): Upgrading to the latest Svelte 5 breaks SvelteKit routing HOT 9
- Svelte 5: this type of directive is not valid on components HOT 5
- [Svelte 5] `{#if}` block with several reactive children does not re-render properly HOT 12
- Svelte 5 legacy: transition not working with svelte:element
- next.167 breaks <svelte:component> in development mode
- Sveltekit + Svelte 5: Navigating only loads the layout, not the page HOT 2
- Svelte 5: Mutating data in load fn stops page reactivity HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.