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
(Persistent) snackbars should be closed and never be displayed when calling closeSnackbar(key).
Current Behavior
When calling closeSnackbar(key), if the snackbar associated with the key is not displayed (but in the queue), the snackbar is not removed from the queue and can be displayed later on. This is especially an issue for persistent snackbars, since they have to be closed programatically, i.e. if the closeSnackbar method is called before the persistent snackbar is displayed, the persistent snackbar is displayed forever.
Click 1 time on DEFAULT.
=> wait for a while: the snackbar is never closed.
Context
I was implementing a persistent loading snackbar which comes into view when a certain action is performed. Before the loading snackbar comes into view, other snackbars could pop up. The time when the loading snackbar should dissapear is dependent on the round trip time to the API server.
Your Environment
Tech
Version
Notistack
0.9.2
React
16.10.1
Browser
Firefox 69.0
The text was updated successfully, but these errors were encountered:
Sorry guys I've been busy with life lately. This shouldn't be a difficult fix. Will try to publish the fix by the end of this week. Thanks for your patience. Any PR is welcome.
Expected Behavior
(Persistent) snackbars should be closed and never be displayed when calling
closeSnackbar(key)
.Current Behavior
When calling
closeSnackbar(key)
, if the snackbar associated with the key is not displayed (but in the queue), the snackbar is not removed from the queue and can be displayed later on. This is especially an issue for persistent snackbars, since they have to be closed programatically, i.e. if thecloseSnackbar
method is called before the persistent snackbar is displayed, the persistent snackbar is displayed forever.Steps to Reproduce
Link: https://codesandbox.io/s/notistack-simple-example-96sud
Important part of the code:
=> wait for a while: the snackbar is never closed.
Context
I was implementing a persistent loading snackbar which comes into view when a certain action is performed. Before the loading snackbar comes into view, other snackbars could pop up. The time when the loading snackbar should dissapear is dependent on the round trip time to the API server.
Your Environment
The text was updated successfully, but these errors were encountered: