deep-c / react-redux-notify

A simple and flexible notifications component built using React and Redux.
https://deep-c.github.io/react-redux-notify/
MIT License
34 stars 14 forks source link

"Close All" button not working #17

Open testradav opened 7 years ago

testradav commented 7 years ago

the action is sent through the reducer (I see REMOVE_ALL_NOTIFICATIONS in the redux store as the last action) but the notifications remain in the store (and thus displayed). I can dismiss them manually. canDismiss is set to true on all my notifications. There is no difference in redux store state when clicking close all. Anyone else encountered this?

notifications displayed: image

notifications in redux store: image

last actions sent through redux store: image

a sample of one of my notifications: image ... image

Seems the code could handle a force parameter, but the param is not being sent in https://github.com/deep-c/react-redux-notify/blob/ea0c29e5e8554b3c3a5d8e0d4feb0437b02385dc/src/components/Notification/index.js#L113

image

the reducer is returning the same state: https://github.com/deep-c/react-redux-notify/blob/ea0c29e5e8554b3c3a5d8e0d4feb0437b02385dc/src/modules/Notifications.js#L47 image

using with chrome on mac os-x10, with react@^0.14.3

deep-c commented 7 years ago

Hi, thanks for creating the issue. That is quite strange and i haven't had a chance to investigate yet. I have however just quickly added the force close option above. See the branch force-close, ill merge that into master ASAP. When i get the time ill try and replicate the problem.

pasichnyk commented 6 years ago

same problem, "Close All" does not work "react-redux-notify": "^2.0.0"

deep-c commented 6 years ago

@Pasichnyk thanks for the heads up, does using forceClose={true} on the Notify component result in all of the notifications closing? Are the notifications being created with canDismiss: false?