bulletproof-react icon indicating copy to clipboard operation
bulletproof-react copied to clipboard

Notification transition not working

Open speccaN opened this issue 3 years ago • 1 comments
trafficstars

The notification popups are not triggering their transition, they just instantly appears and disappears.

Do you have any idea what might be the issue? Tried on macOS Monterey and Windows 10 Chrome and Safari

I managed to do a workaround like this (not the prettiest, but it works)

Notification.tsx

 const [show, setShow] = React.useState(false);

  React.useEffect(() => {
    setTimeout(() => {
      setShow(true);
    }, 50);
  }, []);

      <Transition
          show={show}
          /*...*/
        >
...

<button                
onClick={() => {
      setShow(false);
      setTimeout(() => {
        onDismiss(id);
      }, 100);
    }}}

speccaN avatar Sep 25 '22 16:09 speccaN

It's because the <Transition>-element is missing the appear={true} property.

gambolputty avatar Nov 26 '22 17:11 gambolputty