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
I have two problems on notistack.
First, I set up the callback of onClose on a snackbar and show it, the callback will be executed when I click any way.
Second, when I add a close button on snackbar to close it manually,the callback of onClose will not be executed.
I fixed the two problem temporarily by adding some code to the source code of SnackbarItem.js and SnackbarProvider.js.
Expected Behavior
When I click any way ,the callback of onClose on a snackbar can't be executed.
When I close a snackbar manually, the callback of onClose on a snackbar can be executed.
Second problem, you're right. when a snackbar is closed using closeSnackbar method, onClose callback passed in options parameter of enqueueSnackbar does not get called.
I have two problems on notistack.
First, I set up the callback of onClose on a snackbar and show it, the callback will be executed when I click any way.
Second, when I add a close button on snackbar to close it manually,the callback of onClose will not be executed.
I fixed the two problem temporarily by adding some code to the source code of SnackbarItem.js and SnackbarProvider.js.
Expected Behavior
When I click any way ,the callback of onClose on a snackbar can't be executed.
When I close a snackbar manually, the callback of onClose on a snackbar can be executed.
Current Behavior
Contrary to the Expected Behavior.
Steps to Reproduce
Link: https://github.com/dgczhh/notistackdemo
1.npm install
2.npm start
3.open the Chrome DevTools
4.click the button in web and check the output
Context
I fixed the first problem temporarily by adding some code to
node_modules\notistack\build\SnackbarItem\SnackbarItem.js
after line 78:I fixed the second problem temporarily by adding some code to
node_modules\notistack\build\SnackbarProvider.js
after line 217:Your Environment
The text was updated successfully, but these errors were encountered: