Skip to content

Conversation

@JacopoBonta
Copy link

@JacopoBonta JacopoBonta commented Nov 14, 2025

This pull request refactors the PositioningPortal component to improve how it references its parent DOM node. Instead of using ReactDOM.findDOMNode, which is discouraged in modern React, it now uses a ref attached directly to a wrapping div. This change is implemented across the TypeScript source, the compiled JavaScript, and the legacy build.

Component refactoring:

  • Replaced all instances of ReactDOM.findDOMNode(this) with this.parentRef.current to reference the parent DOM node, and introduced a new parentRef using React.createRef. This makes the code more robust and future-proof, as findDOMNode is deprecated in React's strict mode. (src/components/PositioningPortal.tsx, lib/index.js, lib/legacy/index.js/index.js) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

Build and documentation updates:

  • Updated the Storybook build artifacts and project metadata to reflect the current build environment and dependencies. (docs/iframe.html, docs/project.json) [1] [2]

@webholics this should address the issue with deprecated findDOMNode without having to upgrade to react-19, do you think is it possible to integrate? I've tested the changes with storybook and everything looks fine

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.

1 participant