-
- Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Describe the bug
I have a list that can be filtered, displayed with an <Item/>
component in an each block
. The item component has only one props which has a default value.
The first rendering works well, the Item props takes the props or set the default value if the props is undefined. After filtering, the item of the list with a value "undefined" will not be displayed correctly with the default value of the <Item/>
component.
I tried with and without a keyed each block. It does not change anything.
I'd exepect that the default value is set even after filtering.
There is workarounds: setting the default value when the value is used : {value || "default value"}
Reproduction
Here is a REPL: https://svelte.dev/repl/4944b2037a034b7fb50806e801f080cf?version=3.53.1
Logs
No response
System Info
svelte - 3.53.1
Severity
annoyance