teodosii / react-notifications-component

Delightful and highly customisable React Component to notify your users
https://teodosii.github.io/react-notifications-component/
MIT License
1.27k stars 73 forks source link

Does store.removeNotification(id) not remove notification from dom? #140

Closed AndreaEsposit closed 2 years ago

AndreaEsposit commented 2 years ago

I have noticed that store.removeNotification(id) does not remove notifications from the DOM, is there something wrong with my setup?

export const warning= (message) => {
    Store.addNotification({
        content: ({ id }) => <NotifyCard id={id} title="Something went wrong updating the data" details={message} type="Warning" />,
        insert: 'bottom',
        container: 'bottom-center',
        animationIn: ['animate__animated', 'animate__fadeIn'],
        animationOut: ['animate__animated', 'animate__fadeOut'],
        dismiss: {
            duration: 0,
            showIcon: true,
            click: false,
        },
        width: convertRemToPixels(37),
    });
};

Inside I have a button with onClick={() => Store.removeNotification(id)}, the notification does disappear on click, but it remains in the DOM

I can also see that onRemoval is not being triggered by Store.removeNotification

I am using version 3.3.11 (the one on npm)

teodosii commented 2 years ago

There was a fix for something else which broke this, should be fine now. It also affected github pages, thanks for reporting! Fixed in 3.4.0

Reopen if any other issue!