-
Notifications
You must be signed in to change notification settings - Fork 561
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
Add optional node container target to Portal #756
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 1ef0803:
|
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 for the PR! A few changes requested but I'd like to merge this when we can.
@chaance thanks for reviewing, I made the requested changes now. |
On second thought I think it makes a lot more sense for this prop to accept a ref rather than a DOM node. Probably requested changes before I thought about it more fully, so sorry about that. Let's hold for right now, I'll circle back to this after I've taken care of a few high-priority bugs for the next release. |
Several of the other libraries I encountered write it as an |
@chaance This has been here for a while so I went ahead and updated the type to a Being of Let me know if there are any other changes necessary. Thanks. |
hey @chaance , we could really use this feature too. Our case involves |
I see the PR was merged, thanks @chaance. Now we need to create a PR to pass the prop along for the other libraries that use Portal (e.g. Dialog). |
This PR aims to solve the issue #666.
It introduces a new optional prop for Portal:
nodeContainer
containerRef
that allows the user to specify the containing node to render the Portal in.If this PR is approved, then we can create a follow up PR to pass this prop to other relevant packages.
yarn test
).yarn start
).This pull request: