Trouble closing popover from clicking trigger #5452
Replies: 2 comments
-
A few things were switched around here's a fixed up version https://codesandbox.io/s/great-firefly-c647td?file=/src/Popover.component.tsx Otherwise, I'd just check how closely you match the example setup https://react-spectrum.adobe.com/react-aria/usePopover.html#example You may find it easier though to use our new React Aria Components https://react-spectrum.adobe.com/react-aria/Popover.html they handle all the internal glue for you. |
Beta Was this translation helpful? Give feedback.
-
@snowystinger Thank you so much for looking into it and even fixing it up. That's very appreciated! I'll also take a look at the Aria components as per your recommendation. |
Beta Was this translation helpful? Give feedback.
-
I've referenced the documentation for the
usePopover
hook and I've started writing a custom component with the help from other helpers in the library.However, I'm running into an issue when trying to close the popover from clicking the trigger after it has been open.
I have a reproduction available here.
I'm sure I'm missing something, but any help is appreciated!
Beta Was this translation helpful? Give feedback.
All reactions