Skip to content

DropdownMenu.CheckboxGroup: onValueChange fires twice #1901

@Blackwidow-sudo

Description

@Blackwidow-sudo

Describe the bug

It seems like there was already a similar issue with #1613

Another issue i had was that i couldn't use the onValueChange without binding a value, but that might be shadcn-svelte related, getting:

Svelte error: props_invalid_value
Cannot do `bind:value={undefined}` when `value` has a fallback value
https://svelte.dev/e/props_invalid_value

Reproduction

https://stackblitz.com/edit/gsoggezy?file=src%2Froutes%2F%2Bpage.svelte

Logs

Array [ "notifications" ]
Array [ "notifications" ]

System Info

System:
    OS: Linux 6.6 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)
    CPU: (16) x64 AMD Ryzen 7 7700X 8-Core Processor
    Memory: 10.81 GB / 15.17 GB
    Container: Yes
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 24.11.0 - /home/user/.local/share/pnpm/node
    npm: 11.6.1 - /home/user/.local/share/pnpm/npm
    pnpm: 10.20.0 - /home/user/.local/share/pnpm/pnpm
  npmPackages:
    @sveltejs/kit: ^2.48.5 => 2.48.5 
    bits-ui: ^2.14.4 => 2.14.4 
    svelte: ^5.43.12 => 5.43.12

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageA maintainer needs to review this issue and label it appropriately

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions