ui icon indicating copy to clipboard operation
ui copied to clipboard

How to keep toast and DropdownMenu open while processing a request?

Open RenzoBA opened this issue 2 years ago • 1 comments

If I click on a ToastAction to make a request in my database, the toast disappears immediately. I'm trying to keep the toast open until the request is completed. In the same vein, I have a DropdownMenu with buttons to make requests in my database, but after clicking on one of them, the DropdownMenu closes without waiting for the request to be completed.

Thank you in advance!

RenzoBA avatar Oct 04 '23 03:10 RenzoBA

Have you tried setting manually the open and onOpenChange while you are waiting for a response from the database? You can find the api documentation here: https://www.radix-ui.com/primitives/docs/components/toast#root https://www.radix-ui.com/primitives/docs/components/dropdown-menu#api-reference Many shadcn/ui components are extending the Radix UI components, so check out their docs too

anOatFlake avatar Oct 11 '23 08:10 anOatFlake

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

shadcn avatar Feb 25 '24 23:02 shadcn