Skip to content

Commit 68b2312

Browse files
authored
fix(Command): fallback to id when group has no value (#1428)
1 parent a4adfee commit 68b2312

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/wise-shrimps-try.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"bits-ui": patch
3+
---
4+
5+
fix(Command): fallback to id when no group value

packages/bits-ui/src/lib/bits/command/command.svelte.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ class CommandGroupContainerState {
728728
readonly opts: CommandGroupContainerStateProps,
729729
readonly root: CommandRootState
730730
) {
731-
this.trueValue = opts.value.current;
731+
this.trueValue = opts.value.current ?? opts.id.current;
732732

733733
useRefById({
734734
...opts,

0 commit comments

Comments
 (0)