Closed
Description
Describe the bug
Hi, I made a simple component to wrap a checkbox and his style. I realized that if you use rest props while destructing $props rune, the onchange event is triggered with the wrong value.
When calling onchange checked value is wrong
<script>
let { checked = $bindable(), children, onchange, ...rest } = $props();
</script>
<p>
<label><input type="checkbox" {onchange} {...rest} bind:checked /> {@render children()}</label>
</p>
When calling onchange checked value is right
<script>
let { checked = $bindable(), children, onchange, disabled } = $props();
</script>
<p>
<label><input type="checkbox" {onchange} {disabled} bind:checked /> {@render children()}</label>
</p>
Reproduction
Logs
No response
System Info
Repl
Severity
blocking all usage of svelte
Metadata
Metadata
Assignees
Labels
No labels