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

feat(modal): add preventCloseOnClickOutside prop to Modal #6886

Merged
merged 4 commits into from
Sep 23, 2020
Merged

feat(modal): add preventCloseOnClickOutside prop to Modal #6886

merged 4 commits into from
Sep 23, 2020

Conversation

moczolaszlo
Copy link
Contributor

@moczolaszlo moczolaszlo commented Sep 22, 2020

This is based on #6793 .

Changelog

New

  • preventCloseOnClickOutside to Modal.

Changed

  • Added logic to the handleMousedown (Modal) to prevent closing when this prop is passed in and the click originates outside the modal itself.

Testing / Reviewing

Enable the preventCloseOnClickOutside prop and try clicking outside of the modal. It should not close the modal. Ensure all variants of Modal render properly and still close properly when the prop is not specified.

(Yes, I copied a lot of text from the original PR 😄 .)

@moczolaszlo moczolaszlo requested review from a team as code owners September 22, 2020 13:36
@moczolaszlo moczolaszlo changed the title feat(modal): add primaryButtonDisabled prop to Modal feat(modal): add preventCloseOnClickOutside prop to Modal Sep 22, 2020
@moczolaszlo
Copy link
Contributor Author

Sorry, I made typo in the commit message.

@netlify
Copy link

netlify bot commented Sep 22, 2020

Deploy preview for carbon-elements ready!

Built with commit 0899785

https://deploy-preview-6886--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Sep 22, 2020

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit 0899785

https://deploy-preview-6886--carbon-components-react.netlify.app

@netlify
Copy link

netlify bot commented Sep 22, 2020

Deploy preview for carbon-elements ready!

Built with commit 329be24

https://deploy-preview-6886--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Sep 22, 2020

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit 329be24

https://deploy-preview-6886--carbon-components-react.netlify.app

Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for adding that in! 👍 ✅

@kodiakhq kodiakhq bot merged commit 9743681 into carbon-design-system:master Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants