-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Toast id is not available to custom content #35
Comments
benhodgson87
changed the title
Toast id is not available to custom components
Toast id is not available to custom content
Oct 22, 2019
Hmm, you're correct. Will do a fix these days |
Fixed, will be released in |
Hi, I need the notification ID for different usage. I keep getting below errors.
Seems the integration of React component in "content" prop is the issue. Could you provide a working example with custom content? Thanks |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
As far as I can tell, currently if a custom content component is provided, no props are made available to it. This means that as no close icon is shown it requires dismiss.click to be true to allow the user to dismiss the toast - which clashes if the custom toast contains something like a react-router Link or any other click handler.
Ideally
content
should pass down the id of the toast as a prop to allow the custom component to call theremoveNotification(id)
method on itself.eg:
The text was updated successfully, but these errors were encountered: