-
Notifications
You must be signed in to change notification settings - Fork 4k
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 Portal to use ReactDOM.createPortal #2746
Comments
Agreed. We'll need to plan release timing. This will be part of a breaking change update that will require users to use React >=16 so they have the API. There are other React 16 updates such as returning arrays and strings. This can really help us in some areas. Our Accordion has ugly markup and code due to not being able to return arrays. At any rate, let's batch these changes into a major update. PRs welcome! |
WorkaroundIn the meantime, if you have to mount and test Modal code you can find the elements in the DOM using conventional DOM APIs. This is in fact how our Moda tests have worked for years in the absence of a first-class Portal API. |
Thanks @levithomason, I actually ended up using this suggestion. |
Was fixed in #2755. |
Steps
Mount a react component that has a modal form using enzyme and try searching for children nodes.
Expected Result
A call to
wrapper.find(<content>)
should return content with specified selector.Actual Result
It's not possible to get modal content using enzyme wrapper.
Version
0.79.1
The text was updated successfully, but these errors were encountered: