-
Notifications
You must be signed in to change notification settings - Fork 73
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
Multiple notifications make last notification unable to dismiss #44
Comments
Here comes an update. The problem appears when you dismiss them quickly. The onRemoval function does not execute but the notifications are graphically dismissed. The result is a notification that is not possible to remove. |
I tried on GitHub pages and I was not able to reproduce. You're saying I double checked the handling for dismissal and it's always updating the previous state which should always result in correct dismissal. |
Hello, The problem comes in the mobile device emulation. I created a console.log with a counter that prints on every dismiss. If you click fast in the first notification before the transition completes, the onRemoval action is not executed.
In my code (haven't found the reason yet), the result is shown in the gif. The notifications are fixed and unable to remove. Thanks for your support! |
Thank you for details, will look into it but most likely will get fixed after New Year |
I've tried reproducing this bug but it didn't happen to me. Not even once. Could you have a look again at that? I really don't know what would be causing this as I tried manually spamming notifications and each of them gets closed afterwards. Will close it for now and I'm waiting for your answer. |
When more than 20 notifications arrive without dismissing any of them, the last one remains, unable to dismiss.
To test it:
`const notificationInterval = setInterval(
() =>
storeNotification.addNotification({
title: 'Wonderful!',
message: 'teodosii@react-notifications-component',
type: 'success',
insert: 'top',
container: 'top-right',
animationIn: ['animated', 'fadeIn'],
animationOut: ['animated', 'fadeOut'],
dismiss: {
duration: 0,
onScreen: false
}
}),
1000
);
setTimeout(() => {
clearInterval(notificationInterval);
}, 22000)`
Thanks for the job, the component is awesome
The text was updated successfully, but these errors were encountered: