From 2bb607e02618b4c1ea006dc6b6e1c552d8f36548 Mon Sep 17 00:00:00 2001 From: Azhar Zaman <68331974+azharzaman1@users.noreply.github.com> Date: Mon, 5 Aug 2024 18:23:18 +0500 Subject: [PATCH 1/2] bug-fix: added command-list component to eliminate error Wrap CommandEmpty and CommandGroup inside CommandList Eliminated Error: TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) --- .../default/example/combobox-demo.tsx | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/apps/www/registry/default/example/combobox-demo.tsx b/apps/www/registry/default/example/combobox-demo.tsx index b16ad8fd7b5..b3e4aa1cd32 100644 --- a/apps/www/registry/default/example/combobox-demo.tsx +++ b/apps/www/registry/default/example/combobox-demo.tsx @@ -11,6 +11,7 @@ import { CommandGroup, CommandInput, CommandItem, + CommandList, } from "@/registry/default/ui/command" import { Popover, @@ -63,27 +64,29 @@ export default function ComboboxDemo() { - No framework found. - - {frameworks.map((framework) => ( - { - setValue(currentValue === value ? "" : currentValue) - setOpen(false) - }} - > - - {framework.label} - - ))} - + + No framework found. + + {frameworks.map((framework) => ( + { + setValue(currentValue === value ? "" : currentValue); + setOpen(false); + }} + > + + {framework.label} + + ))} + + From 2230386ff898f7830c8976079f5560dbcb1ad9bc Mon Sep 17 00:00:00 2001 From: shadcn Date: Tue, 6 Aug 2024 01:29:49 +0400 Subject: [PATCH 2/2] fix(www): command examples --- .../dashboard/components/team-switcher.tsx | 2 +- .../examples/forms/account/account-form.tsx | 2 +- .../default/example/combobox-demo.tsx | 6 +-- .../new-york/example/combobox-demo.tsx | 44 ++++++++++--------- 4 files changed, 28 insertions(+), 26 deletions(-) diff --git a/apps/www/app/(app)/examples/dashboard/components/team-switcher.tsx b/apps/www/app/(app)/examples/dashboard/components/team-switcher.tsx index 284ca799458..42c7af13240 100644 --- a/apps/www/app/(app)/examples/dashboard/components/team-switcher.tsx +++ b/apps/www/app/(app)/examples/dashboard/components/team-switcher.tsx @@ -110,8 +110,8 @@ export default function TeamSwitcher({ className }: TeamSwitcherProps) { + - No team found. {groups.map((group) => ( diff --git a/apps/www/app/(app)/examples/forms/account/account-form.tsx b/apps/www/app/(app)/examples/forms/account/account-form.tsx index 4c7ead2df97..9fabda98c9c 100644 --- a/apps/www/app/(app)/examples/forms/account/account-form.tsx +++ b/apps/www/app/(app)/examples/forms/account/account-form.tsx @@ -181,8 +181,8 @@ export function AccountForm() { - No language found. + No language found. {languages.map((language) => ( { - setValue(currentValue === value ? "" : currentValue); - setOpen(false); + setValue(currentValue === value ? "" : currentValue) + setOpen(false) }} > {framework.label} diff --git a/apps/www/registry/new-york/example/combobox-demo.tsx b/apps/www/registry/new-york/example/combobox-demo.tsx index 9429264b178..86ca85984c8 100644 --- a/apps/www/registry/new-york/example/combobox-demo.tsx +++ b/apps/www/registry/new-york/example/combobox-demo.tsx @@ -64,27 +64,29 @@ export default function ComboboxDemo() { - No framework found. - - {frameworks.map((framework) => ( - { - setValue(currentValue === value ? "" : currentValue) - setOpen(false) - }} - > - {framework.label} - - - ))} - + + No framework found. + + {frameworks.map((framework) => ( + { + setValue(currentValue === value ? "" : currentValue) + setOpen(false) + }} + > + {framework.label} + + + ))} + +