-
I want to trigger the Alert Dialog without clicking on the button. My use case is when a file is successfully uploaded the modal should display. This is my code below:
it is used in this component:
So from the code, I want to the Alert dialog modal to show after a successful upload, but it does not trigger the alert dialog after the upload. Is there something I'm missing to achieve this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
you can control the dialog with state |
Beta Was this translation helpful? Give feedback.
-
It works as it suppose to. Thanks |
Beta Was this translation helpful? Give feedback.
you can control the dialog with state
<AlertDialog open={showModal} onOpenChange={setShowModal}>..
https://www.radix-ui.com/docs/primitives/components/alert-dialog