-
Notifications
You must be signed in to change notification settings - Fork 31
Description
The toast component allows us to include not only plain text in the description but also custom components when needed. This flexibility is invaluable in our application, as it enables us to provide users with actionable buttons alongside notifications. The application we are developing involves asynchronous processes that can run for several hours. In such cases, users typically do not wait for the process to complete but instead start new ones. Events related to these processes often arrive as toast notifications with significant delays—sometimes hours after initiation.
In these scenarios, it's extremely helpful if a toast includes a button that allows the user to navigate directly to the relevant process upon receiving a notification.
The issue arises when a user clicks an action button placed inside the toast description. Currently, we cannot programmatically call the toast.close method, requiring the user to click the 'x' icon manually to dismiss the toast.
Would it be possible for the toast function to return a reference to the created toast component or at least provide access to its close method?