Replies: 1 comment
-
@vanirvan
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I don't know how to "attach more props" to these react ref, yes i don't understand ref, so please help me.
so, the original DialogContent component is looks like this:
The scenario is, i want to display a dialog that can't be closed except by certain action, mainly for blocking the real content behind the page.
In Radix's Dialog docs, i found
onCloseFocus
,onEscapeKeyDown
,onPointerDownOutside
, andonInteractOutside
options that i can pass onDialogContent
and it works well, but Shadcn-ui's decide to addDialogClose
insideDialogContent
by default.My current workaround is to duplicate the entire dialog, and the comment
<DialogClose />
insideDialogContent
on the duplicated components.Beta Was this translation helpful? Give feedback.
All reactions