question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dismiss and duration don't work on a custom toast

See original GitHub issue

Hello, 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:open
  • Created a year ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
timolinscommented, Jul 12, 2022

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

1reaction
peniqliotuvcommented, Jul 6, 2022

+1 to this - only calling toast.remove() and toast.remove(id) is working for me as well – I’m using toast() instead of toast.custom() though

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found