Closed loiclaudet closed 1 year ago
The problem lies in using refs, which don't trigger re-renders in React.
When popover-root DOM element is retrieved in useEffect, the component doesn't re-render, and as a result, the popover content isn't displayed.
popover-root
useEffect
This bug is currently masked when the Popover's parent component triggers a re-render.
Use a useState hook that triggers a component re-render as soon as the popover-root DOM element is found.
useState
Issue
The problem lies in using refs, which don't trigger re-renders in React.
When
popover-root
DOM element is retrieved inuseEffect
, the component doesn't re-render, and as a result, the popover content isn't displayed.This bug is currently masked when the Popover's parent component triggers a re-render.
Fix
Use a
useState
hook that triggers a component re-render as soon as thepopover-root
DOM element is found.