alexkatz / react-tiny-popover

A simple and highly customizable popover react higher order component with no other dependencies! Typescript friendly.
MIT License
445 stars 119 forks source link

React 18 with Next.js breaks tiny-popover #199

Open 60pfennig opened 11 months ago

60pfennig commented 11 months ago

Hi, after upgrading to React 18 with Next.js the onClickOutside function get called immediatly hitting the child of popover. So there is no chance to open the popver because the initial click on the open button gets somehow recognized as a clickOutside and reverts the isOpen change.

60pfennig commented 11 months ago

"dirty -fix":

      onClickOutside={() =>
        setIsOpen((isOpen) => {
          return !isOpen ? false : true;
        })
      }
vladnicula commented 9 months ago

I am using it fine with react 18 and next 13, but for me the clickoutside never gets called

Parth909 commented 8 months ago

Yes, it is breaking