From 8396785d3a54347a50490f14b9759b46c464721a Mon Sep 17 00:00:00 2001 From: Tomoya Kashifuku Date: Sun, 18 May 2025 00:02:57 +0900 Subject: [PATCH 1/2] fix: set dialog title when provided --- cmdk/src/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmdk/src/index.tsx b/cmdk/src/index.tsx index 3131c7b..95e6ff0 100644 --- a/cmdk/src/index.tsx +++ b/cmdk/src/index.tsx @@ -880,12 +880,13 @@ const List = React.forwardRef((props, forwardedRef) = * Renders the command menu in a Radix Dialog. */ const Dialog = React.forwardRef((props, forwardedRef) => { - const { open, onOpenChange, overlayClassName, contentClassName, container, ...etc } = props + const { open, onOpenChange, overlayClassName, contentClassName, container, title, ...etc } = props return ( + {title && } From 126206e0fb30551f0df69f416ab0fd62ae97ffc1 Mon Sep 17 00:00:00 2001 From: Tomoya Kashifuku Date: Mon, 16 Jun 2025 11:29:02 +0900 Subject: [PATCH 2/2] fix: set dialog description when provided --- cmdk/src/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmdk/src/index.tsx b/cmdk/src/index.tsx index 95e6ff0..4ad84b1 100644 --- a/cmdk/src/index.tsx +++ b/cmdk/src/index.tsx @@ -33,6 +33,8 @@ type DialogProps = RadixDialog.DialogProps & contentClassName?: string /** Provide a custom element the Dialog should portal into. */ container?: HTMLElement + /** Provide a hidden description text to the Dialog content */ + description?: string } type ListProps = Children & DivProps & { @@ -880,13 +882,14 @@ const List = React.forwardRef((props, forwardedRef) = * Renders the command menu in a Radix Dialog. */ const Dialog = React.forwardRef((props, forwardedRef) => { - const { open, onOpenChange, overlayClassName, contentClassName, container, title, ...etc } = props + const { open, onOpenChange, overlayClassName, contentClassName, container, title, description, ...etc } = props return ( {title && } + {description && }