From f3233799096b18b1d6c86391799a7c98a110fa4d Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Tue, 14 Nov 2023 16:26:24 +0100 Subject: [PATCH] fix(Dropdown): use `NuxtLink` with `custom` prop to close on select Fixes #899 --- src/runtime/components/elements/Dropdown.vue | 42 +++++++++++--------- src/runtime/types/dropdown.d.ts | 4 +- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/runtime/components/elements/Dropdown.vue b/src/runtime/components/elements/Dropdown.vue index c98800760b..8ef60c007f 100644 --- a/src/runtime/components/elements/Dropdown.vue +++ b/src/runtime/components/elements/Dropdown.vue @@ -21,25 +21,29 @@
- - - - - - - {{ item.label }} - - - {{ shortcut }} - - - - + + + + + + + + {{ item.label }} + + + {{ shortcut }} + + + + +
diff --git a/src/runtime/types/dropdown.d.ts b/src/runtime/types/dropdown.d.ts index 76ce627272..1177e1862d 100644 --- a/src/runtime/types/dropdown.d.ts +++ b/src/runtime/types/dropdown.d.ts @@ -1,7 +1,7 @@ -import type { Link } from './link' +import type { NuxtLinkProps } from '#app' import type { Avatar } from './avatar' -export interface DropdownItem extends Link { +export interface DropdownItem extends NuxtLinkProps { label: string slot?: string icon?: string