Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: cmdk force-mount (#29233)

Charis5e4e7d521b4c
diff --git a/packages/ui-patterns/CommandMenu/internal/Command.tsx b/packages/ui-patterns/CommandMenu/internal/Command.tsx
index 23859ddd808..85d8727431e 100644
--- a/packages/ui-patterns/CommandMenu/internal/Command.tsx
+++ b/packages/ui-patterns/CommandMenu/internal/Command.tsx
@@ -85,7 +85,6 @@ const CommandItem = forwardRef<
>(({ children, className, command: _command, ...props }, ref) => {
const router = useCrossCompatRouter()
const setIsOpen = useSetCommandMenuOpen()
- const query = useQuery()
const command = _command as ICommand // strip the readonly applied from the proxy
@@ -103,11 +102,8 @@ const CommandItem = forwardRef<
}
: () => {}
}
- value={
- command.forceMount
- ? `${query} ${command.value ?? command.name}`
- : command.value ?? command.name
- }
+ value={command.value ?? command.name}
+ forceMount={command.forceMount}
className={cn(
generateCommandClassNames(isRouteCommand(command)),
className,