From 7af3b612d6ae5bd96f7e5b5d1cae63041bdc8869 Mon Sep 17 00:00:00 2001 From: Sadegh Barati Date: Sat, 9 Mar 2024 20:36:35 +0330 Subject: [PATCH] fix: unable to close `Combobox` with esc key (#401) --- apps/www/src/lib/registry/default/ui/command/CommandList.vue | 4 +++- apps/www/src/lib/registry/new-york/ui/command/CommandList.vue | 4 +++- apps/www/src/public/registry/styles/default/command.json | 4 ++-- apps/www/src/public/registry/styles/new-york/command.json | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/apps/www/src/lib/registry/default/ui/command/CommandList.vue b/apps/www/src/lib/registry/default/ui/command/CommandList.vue index 710d0bc5..00d1b3a7 100644 --- a/apps/www/src/lib/registry/default/ui/command/CommandList.vue +++ b/apps/www/src/lib/registry/default/ui/command/CommandList.vue @@ -4,7 +4,9 @@ import type { ComboboxContentEmits, ComboboxContentProps } from 'radix-vue' import { ComboboxContent, useForwardPropsEmits } from 'radix-vue' import { cn } from '@/lib/utils' -const props = defineProps() +const props = withDefaults(defineProps(), { + dismissable: false, +}) const emits = defineEmits() const delegatedProps = computed(() => { diff --git a/apps/www/src/lib/registry/new-york/ui/command/CommandList.vue b/apps/www/src/lib/registry/new-york/ui/command/CommandList.vue index 710d0bc5..00d1b3a7 100644 --- a/apps/www/src/lib/registry/new-york/ui/command/CommandList.vue +++ b/apps/www/src/lib/registry/new-york/ui/command/CommandList.vue @@ -4,7 +4,9 @@ import type { ComboboxContentEmits, ComboboxContentProps } from 'radix-vue' import { ComboboxContent, useForwardPropsEmits } from 'radix-vue' import { cn } from '@/lib/utils' -const props = defineProps() +const props = withDefaults(defineProps(), { + dismissable: false, +}) const emits = defineEmits() const delegatedProps = computed(() => { diff --git a/apps/www/src/public/registry/styles/default/command.json b/apps/www/src/public/registry/styles/default/command.json index a71b6fbd..a999b1a0 100644 --- a/apps/www/src/public/registry/styles/default/command.json +++ b/apps/www/src/public/registry/styles/default/command.json @@ -32,7 +32,7 @@ }, { "name": "CommandList.vue", - "content": "\n\n\n" + "content": "\n\n\n" }, { "name": "CommandSeparator.vue", @@ -48,4 +48,4 @@ } ], "type": "components:ui" -} \ No newline at end of file +} diff --git a/apps/www/src/public/registry/styles/new-york/command.json b/apps/www/src/public/registry/styles/new-york/command.json index 160b4f63..ffcbdb03 100644 --- a/apps/www/src/public/registry/styles/new-york/command.json +++ b/apps/www/src/public/registry/styles/new-york/command.json @@ -32,7 +32,7 @@ }, { "name": "CommandList.vue", - "content": "\n\n\n" + "content": "\n\n\n" }, { "name": "CommandSeparator.vue", @@ -48,4 +48,4 @@ } ], "type": "components:ui" -} \ No newline at end of file +}