Skip to content

Programmatically Close Dialog #1504

Answered by joaom00
ColeMiller21 asked this question in Q&A
Discussion options

You must be logged in to vote

To control the Dialog you can do this

const [open, setOpen] = React.useState(false)

<Dialog open={open} onOpenChange={setOpen}>
  ...
</Dialog>

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@ColeMiller21
Comment options

@hamzabenarfa
Comment options

Answer selected by ColeMiller21
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants