Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Modal): Including onClose gives an error #643

Closed
jlag34 opened this issue Oct 7, 2016 · 1 comment
Closed

fix(Modal): Including onClose gives an error #643

jlag34 opened this issue Oct 7, 2016 · 1 comment
Labels

Comments

@jlag34
Copy link

jlag34 commented Oct 7, 2016

Steps to Reproduce
Copy and paste a modal and include onClose in the <Modal> tag

Expected
No error

Result
Unknown prop onClose on <div> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop. In div (created by Modal)

I looked more into this and it lead me to:

react-bootstrap/react-bootstrap#1994

which lead me to:

facebook/react#6800

Sorry if you guys are already aware of this. Poked around a bit and didn't see anyone bring this up yet.

@levithomason
Copy link
Member

I suspect this is due to an older version. We recently updated the Modal from onHide to onClose. Though, the latest master does not throw this warning, neither do the latest docs for the Modal with onClose: http://localhost:8080/modules/modal#close-config

Our components "consume" props that they handle, and pass the rest on the underlying element. If you're on a version where the Modal does not handle and consume the onClose prop, then it will pass it to the div and cause this error.

Closing as I cannot reproduce on the latest. Feel offer more info if you see the error after updating.

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

No branches or pull requests

2 participants