[Feature Request] OnTimeout callback for toasts #149
Labels
Feature
New feature that will be added to the project
Needs: Design
The issues needs design work before implementing
Is your feature request related to a problem? Please describe.
I'm trying to show the user a time-constrained action they can take. I'm trying to use Blazored.Toast for this by making use of the timeout and onclick features. However, I'd like to be able to hook into the timeout process in order to perform a different action if the toast times out without the user clicking on it.
Describe the solution you'd like
An extra parameter of type
Action?
on theToastService
methods:Example usage:
Describe alternatives you've considered
Not toast related. I conditionally show a button on the DOM, and get rid of it after the desired timeout.
Additional context
If this is considered to be a valid feature request, I'm fairly certain I can help to bring it over the finish line by adding an OnTimeout handler to
_countdownTimer.OnElapsed
here and removing the OnTimeout handler when the toast is clicked here (so that both are not called).The text was updated successfully, but these errors were encountered: