Replies: 1 comment 1 reply
-
It looks like multiple people already raised this issue for individual components: So it's definitely something worth looking at. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sometimes you need to know whether
Popover
orMenu
is open in thesetup
function of a Vue.js component where it is used. But there's no way to directly get this information from these components right now as it is only accessible in a template via slot props.I have found a workaround where I pass this value to a child component and then emit it from there like this:
But it's not very convenient. It would be much better if something like this was possible:
It could be
open
event in Vue.js andonOpen
callback prop in React whereopen
value would be passed. Or there could be two separate events, one for opening and another one for closing.I think not only
open
value but all internal state of all Headless UI components that could potentially be of interest to the "outside world" should be propagated out this way.Beta Was this translation helpful? Give feedback.
All reactions