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): Allow passing in an element selector to append modal to #1817

Merged
merged 3 commits into from Apr 22, 2020

Conversation

ramoncaldeira
Copy link
Contributor

  • Bug fix
  • New feature
  • Chore
  • Breaking change
  • There is an open issue which this change addresses
  • I have read the CONTRIBUTING document.
  • My commits follow the Git Commit Guidelines
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Refers to #859.

I believe this feature is important when using Fullscreen API to request fullscreen for an element other than body. Specifying another parent for the modal allows the Modal to be used in fullscreen mode.

I couldn't add more tests because of a limitation of Enzyme to test portals.

@TheSharpieOne
Copy link
Member

nice. One nit, can you rename it to container since there is an existing prop for other components that does the same thing.

@ramoncaldeira
Copy link
Contributor Author

@TheSharpieOne Sure. I updated the PR with this change

Make modal fallback to body if the specified container is not found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants