-
Notifications
You must be signed in to change notification settings - Fork 808
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
Update README for issue close modal when user click on overlay #352
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much @SLyHuy for the PR. I think we need to change it up a bit though. If you could make the changes I suggested, I'd be happy to merge it.
README.md
Outdated
@@ -220,7 +220,7 @@ When using React Test Utils with this library, here are some things to keep in m | |||
- You need to use the `.portal` property, as in `ReactDOM.findDOMNode(renderedModal.portal)` or `TestUtils.scryRenderedDOMComponentsWithClass(Modal.portal, 'my-modal-class')` to acquire a handle to the inner contents of your modal. | |||
|
|||
By default the modal is closed when clicking outside of it (the overlay area). If you want to prevent this behavior you can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... maybe this whole section should read more like:
By default the modal will attempt to close when clicking outside of it (on the overlay area). Because the open and closed state of the modal should be controlled outside of the modal, you need to provide the `onRequestClose` function prop to actually set the state. If you want to prevent the overlay close behavior, you should pass the `shouldCloseOnOverlayClick` props as `false`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claydiffrient oke, done.
README.md
Outdated
@@ -220,7 +220,7 @@ When using React Test Utils with this library, here are some things to keep in m | |||
- You need to use the `.portal` property, as in `ReactDOM.findDOMNode(renderedModal.portal)` or `TestUtils.scryRenderedDOMComponentsWithClass(Modal.portal, 'my-modal-class')` to acquire a handle to the inner contents of your modal. | |||
|
|||
By default the modal is closed when clicking outside of it (the overlay area). If you want to prevent this behavior you can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
#351