fix: prevent dialog from closing on outside click and escape key
This commit is contained in:
parent
f367b56633
commit
8b1273a819
@ -48,7 +48,11 @@
|
||||
|
||||
<Dialog {open} onOpenChange={(val) => (open = val)}>
|
||||
<DialogTrigger class={buttonVariants({ variant: 'default' })}>Upload</DialogTrigger>
|
||||
<DialogContent showCloseButton={false}>
|
||||
<DialogContent
|
||||
showCloseButton={false}
|
||||
onInteractOutside={(e) => e.preventDefault()}
|
||||
onEscapeKeydown={(e) => e.preventDefault()}
|
||||
>
|
||||
<DialogHeader class="mb-4">
|
||||
<DialogTitle>Upload Image</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
Loading…
x
Reference in New Issue
Block a user