Dismiss and duration don't work on a custom toast
See original GitHub issueHello, I did a custom toast using a component:
toast.custom(<ScheduledToaster />);
But I can’t use the duration like that:
toast.custom(<ScheduledToaster />, { duration: 10000 });
And I can’t use toast.dismiss(), to remove all custom toasts, only toast.remove() is working.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
android - Custom Toast Cancel not working - Stack Overflow
The method is called when user selects (onClick) the view/layout. The issue is when the user selects few times, the toast will get...
Read more >Adding duration for custom toast message in Lightning
There is no extra parameter to control the timing of the toasts. The reason being showing toast and looks are controlled by lightning...
Read more >toast() API
Every type has its own duration. You can overwrite them duration with the toast options. This can be done per toast options or...
Read more >Toast | Android Developers
VERSION_CODES#R or higher that are in the background will not have custom toast views displayed. void, show(). Show the view for the specified...
Read more >Toast - .NET MAUI Community Toolkit - Microsoft Learn
Toast is a timed alert that appears at the bottom of the screen. It is automatically dismissed after a configurable duration of time....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can you please provide an example which reproduces this issue? It works fine on my end: https://codesandbox.io/s/react-hot-toast-custom-toast-dismiss-re8xhs
+1 to this - only calling
toast.remove()
andtoast.remove(id)
is working for me as well – I’m usingtoast()
instead oftoast.custom()
though