react-notification-system icon indicating copy to clipboard operation
react-notification-system copied to clipboard

How to use editNotification()

Open alveshelio opened this issue 8 years ago • 3 comments

Hi guys,

I'm sorry to post this here but I've searched everywhere and I can't find a solution.

Here's my situation. I need to pass a countdown to a notification and I don't really know how to do it. My countdown works fine in my component, however, when I send it to the notification, it only sends the value of the countdown at the moment of creating the notification. I've checked the documentation and there's a method editNotification() that takes a UID and an updated object.

I'm using react-notification-system with react-notification-system-redux and when I want to create a notification I simply dispatch error(object) and my notification is created. However, I've checked react-notification-system-redux docs but I don't see any editNotification action.

I'd like to know how I could create an action to dispatch editNotification. I've checked the examples but I'm not sure I fully understand. I see a method _editNotification but I don't see any example calling it.

Any help would be appreciated.

alveshelio avatar Jan 31 '18 17:01 alveshelio

I was facing almost same issue. I wanted to update notification when back-end process was done. edit functionality is not working as expected. I successfully updated the notification but its autoDismiss time was not getting refreshed (I mean message changed and then disappeared) So I finally wrote the extension of react-notification-system It probably serve your purpose. check this link https://github.com/SheikhG1900/react-notifier-system

SheikhG1900 avatar Apr 05 '18 18:04 SheikhG1900

I created at PR to describe at least the editNotificatioǹ arguments correctly. See: https://github.com/igorprado/react-notification-system/pull/152

jpsikorra avatar May 31 '18 10:05 jpsikorra

@alveshelio @SheikhG1900 @jpsikorra Merged #152. Sorry for the wait.

syndbg avatar May 31 '18 11:05 syndbg