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
Uh oh!
There was an error while loading. Please reload this page.
-
Sometimes you need to know whether
PopoverorMenuis open in thesetupfunction 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
openevent in Vue.js andonOpencallback prop in React whereopenvalue would be passed. Or there could be two separate events, one for opening and another one for closing.I think not only
openvalue 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