Skip to content

Unable to set <input type="checkbox" bind:group> value to an object literal with multiple members #14462

@yamplum

Description

@yamplum

Describe the bug

Setting the value prop of an <input type="checkbox"> element used in a bind:group setup to an object literal with multiple members fails to compile. Empty object literal {} or an object with at most one key seems to work. Objects in general seem to work as well, such as when wrapped in an IIFE.

Reproduction

https://svelte.dev/playground/74d3488e87e14e539fada023cd88109a?version=5.2.10

Logs

No response

System Info

System:
    OS: macOS 15.1.1
    CPU: (8) arm64 Apple M1
    Memory: 153.75 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 23.1.0 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.9.0 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 131.0.6778.86
    Safari: 18.1.1
  npmPackages:
    svelte: ^5.0.0 => 5.1.2

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions