salesforce / design-system-react

Salesforce Lightning Design System for React
https://design-system-react-site.herokuapp.com/
BSD 3-Clause "New" or "Revised" License
915 stars 416 forks source link

Update the Portal component to use the new react portal api (when overflowBoundaryElement is used for position) #3029

Open bolivierjr opened 2 years ago

bolivierjr commented 2 years ago

Fixing Portal component by switching from ReactDOM.unstable_renderSubtreeIntoContainer to React.createPortal, so that the context from PortalSettings, carries through when having multiple layers of overflowBoundaryElement.

This would also get you one step closer to using react 18 in the future, since the ReactDOM unstable_renderSubtreeIntoContainer method will be deprecated and will need to change to the react portals api.

Fixes #3028

Additional description


CONTRIBUTOR checklist (do not remove)

Please complete for every pull request

REVIEWER checklist (do not remove)