Closed armoniaechaos closed 4 years ago
initialState = { isOpen: false }
const onToggle = () => setState({ isOpen: !state.isOpen })
const Item = ({ title, value }) => (
);
const content = (
const popoverProps = { isOpen: state.isOpen, onToggle: onToggle, content, position: 'top', anchor: 'start', event: 'hover', className: 'baloon', delay: { whenOpen: 100 } };
![Kapture 2020-04-09 at 12 35 52](https://user-images.githubusercontent.com/22859283/78886545-b0cd9900-7a5e-11ea-82c6-8c16d78dad8b.gif) Instead, by making it uncontrolled, it works perfectly.
const popoverProps = { content, position: 'top', anchor: 'start', event: 'hover', className: 'baloon', delay: { whenOpen: 100 } };
Repro
const onToggle = () => setState({ isOpen: !state.isOpen })
const Item = ({ title, value }) => (
);
const content = (
);
const popoverProps = { isOpen: state.isOpen, onToggle: onToggle, content, position: 'top', anchor: 'start', event: 'hover', className: 'baloon', delay: { whenOpen: 100 } };
initialState = { isOpen: false }
const onToggle = () => setState({ isOpen: !state.isOpen })
const Item = ({ title, value }) => (
);
const content = (
);
const popoverProps = { content, position: 'top', anchor: 'start', event: 'hover', className: 'baloon', delay: { whenOpen: 100 } };