From 5c12c00ceca0beab672db431276d045468013f88 Mon Sep 17 00:00:00 2001 From: p-sw Date: Thu, 27 Jun 2024 13:24:10 +0900 Subject: [PATCH] fix: add stopPropagation in DialogContent onClick To prevent triggering closeOnClick on click of inner content. --- packages/react/components/Dialog/Component.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/react/components/Dialog/Component.tsx b/packages/react/components/Dialog/Component.tsx index b0051ac..7e5d00d 100644 --- a/packages/react/components/Dialog/Component.tsx +++ b/packages/react/components/Dialog/Component.tsx @@ -184,12 +184,16 @@ const DialogContent = React.forwardRef( ...props, opened, }); - const { children, ...otherPropsExtracted } = otherPropsCompressed; + const { children, onClick, ...otherPropsExtracted } = otherPropsCompressed; return (
{ + e.stopPropagation() + onClick?.(e) + }} > {children}