mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-24 21:25:55 +00:00
fix(docs): command menu unresponsive after no results (#455)
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
import * as React from "react"
|
||||
import { useRouter } from "next/navigation"
|
||||
import { DialogProps } from "@radix-ui/react-alert-dialog"
|
||||
import { allDocs } from "contentlayer/generated"
|
||||
import { Circle, File, Laptop, Moon, SunMedium } from "lucide-react"
|
||||
import { useTheme } from "next-themes"
|
||||
|
||||
@@ -68,6 +67,7 @@ export function CommandMenu({ ...props }: DialogProps) {
|
||||
.map((navItem) => (
|
||||
<CommandItem
|
||||
key={navItem.href}
|
||||
value={navItem.title}
|
||||
onSelect={() => {
|
||||
runCommand(() => router.push(navItem.href as string))
|
||||
}}
|
||||
@@ -82,6 +82,7 @@ export function CommandMenu({ ...props }: DialogProps) {
|
||||
{group.items.map((navItem) => (
|
||||
<CommandItem
|
||||
key={navItem.href}
|
||||
value={navItem.title}
|
||||
onSelect={() => {
|
||||
runCommand(() => router.push(navItem.href as string))
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user