Skip to content
This repository was archived by the owner on Dec 24, 2019. It is now read-only.

Conversation

elrumordelaluz
Copy link
Contributor

Add references to timeouts that allows to clear them before unmount each notification.
So, let available to add action and onClick props in Notifications Components inside a Stack. #46

I tryied to let the example as it is (using OrderedSetfrom Immutable.js) but didn't find a way to reference each generated Notification Component inside its own onClick prop, so I changed the example with a raw Object, referenced with an unique id based on Date.now() (with the same advice comment).

stacnotif

This resolves #46.

- Leave the `action` and `onClick` props to be defines by the Notification component
- Add references to timer to `clearTimeout` when will unmount
- Use an Object to control the Notifications State
- Add a method to handle Remove Notification, invoked from `onDismiss` and `onClick`
@pburtchaell
Copy link
Owner

👍

@pburtchaell pburtchaell merged commit 5b6ccd5 into pburtchaell:master Apr 11, 2016
@pburtchaell
Copy link
Owner

This is released in [email protected]. Thanks @elrumordelaluz!

@pburtchaell
Copy link
Owner

Oh @elrumordelaluz one last thing, would you mind updating the docs with this change and making a new PR? That would be much appreciated!

@elrumordelaluz
Copy link
Contributor Author

Sure, no problem!

@elrumordelaluz
Copy link
Contributor Author

@pburtchaell In #64 I updated some stuff.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Actions Link on NotificationStack
2 participants