alexkatz / react-tiny-popover

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

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

Open 60pfennig opened 1 year ago

60pfennig commented 1 year 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 1 year ago

"dirty -fix":

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

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

Parth909 commented 10 months ago

Yes, it is breaking