direflow
direflow copied to clipboard
Fix for Material-ui tooltip display issue
When using material-ui tooltip component, tooltip pop up DOM elements getting generated out of web component. Sample code to fix this issue:
import { RootRef } from '@material-ui/core';
import Tooltip from '@material-ui/core/Tooltip';
import Button from '@material-ui/core/Button';
const domRef = React.useRef();
<RootRef rootRef={domRef}>
<Tooltip title="Add" arrow PopperProps={{container:domRef.current}}>
<Button>Arrow</Button>
</Tooltip>
</RootRef>
Happy coding :)
Thank you it worked, you saved me hours of research.