Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to tell if user intentionally closed a notification #591

Open
mbwestphal opened this issue Dec 4, 2023 · 0 comments
Open

Impossible to tell if user intentionally closed a notification #591

mbwestphal opened this issue Dec 4, 2023 · 0 comments

Comments

@mbwestphal
Copy link

mbwestphal commented Dec 4, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant