You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it is impossible to tell if a user intentionally closed a notification by clicking on the "close" button or if "closeSnackbar" was invoked from somewhere in the application for whatever reason. Both will deliver reason "instructed".
If I were to create my own "close" button using the action or content options I would be able to just store this information onClick but I do not want to create my own components. That is part of the reason I am using notistack.
Expected Behavior
A "user" reason will be given onClose when the user presses the "close" button.
Alternatively, let us provide our own close reason as a second parameter to closeSnackbar.
Current Behavior
The "instructed" reason is given.
The text was updated successfully, but these errors were encountered:
Currently it is impossible to tell if a user intentionally closed a notification by clicking on the "close" button or if "closeSnackbar" was invoked from somewhere in the application for whatever reason. Both will deliver reason "instructed".
If I were to create my own "close" button using the
action
orcontent
options I would be able to just store this informationonClick
but I do not want to create my own components. That is part of the reason I am using notistack.Expected Behavior
A
"user"
reason will be givenonClose
when the user presses the "close" button.Alternatively, let us provide our own close reason as a second parameter to
closeSnackbar
.Current Behavior
The
"instructed"
reason is given.The text was updated successfully, but these errors were encountered: