Add controlled component capabilities to the Popover component #2206
JoseRFelix
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
I believe this is duplicate of #1626 |
Beta Was this translation helpful? Give feedback.
1 reply
-
This would make the Popover a whole lot more versatile and easier to use in these situations. Any response from the headlessui team? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
This feature will enhance the library's functionality and cater to more use cases.
Description:
Currently, the Popover component in the @headlessui/react library does not have the capability to be a controlled component. This means that it cannot be opened or closed programmatically by updating the parent component's state.
It would be great if this capability could be added to the Popover component for more advanced use cases.
Proposed Solution:
isOpen
to the Popover component. This prop will accept a boolean value and determine whether the popover is open or closed.onChange()
that receives the next state value.togglePopover()
to the render functionBeta Was this translation helpful? Give feedback.
All reactions