[BUG] onDisappear is triggers when we render component with react-testing-library
avishelkeumg opened this issue · comments
avishelkeumg commented
I'm not able to test the component with react-testing-library.
` const [isOpen, setOpen] = useState(false);
function close() {
setOpen(false);
}
const { renderLayer, triggerProps, layerProps, arrowProps } = useLayer({
isOpen,
onOutsideClick: close,
onDisappear: close,
overflowContainer: false,
auto: true,
});`
when we open popover, immediately its getting closed.
So I tried with removing onDisappear props then it works fine.