diff --git a/.changeset/tall-rivers-destroy.md b/.changeset/tall-rivers-destroy.md new file mode 100644 index 000000000..db69df523 --- /dev/null +++ b/.changeset/tall-rivers-destroy.md @@ -0,0 +1,5 @@ +--- +"bits-ui": patch +--- + +Menu Radio Group: fixed equality issue in change function condition diff --git a/src/lib/bits/menu/components/menu-radio-group.svelte b/src/lib/bits/menu/components/menu-radio-group.svelte index e6598cfd6..8e0cc0e28 100644 --- a/src/lib/bits/menu/components/menu-radio-group.svelte +++ b/src/lib/bits/menu/components/menu-radio-group.svelte @@ -17,7 +17,7 @@ } = setRadioGroupCtx({ defaultValue: value, onValueChange: ({ next }) => { - if (next && next !== value) { + if (next != null && next !== value) { onValueChange?.(next); value = next; }