Disclosure programmatically closing / opening #589
Replies: 10 comments 5 replies
-
try this
|
Beta Was this translation helpful? Give feedback.
-
It would be really helpful to be able to programmatically open and close, for example |
Beta Was this translation helpful? Give feedback.
-
Is this still not a thing? |
Beta Was this translation helpful? Give feedback.
-
Also ran into this. My use case is a tree view component where I have built the nodes using Everything works as expected on initial render, i.e. the first node opens, loads dynamic child nodes and then those open as well up to the correct node, based on the current URL. But when in a top node and going to a URL of a child node, the component itself knows that it should be active, and all the nodes between the top and active node know, but the As mentioned in #770, a workaround includes changing the |
Beta Was this translation helpful? Give feedback.
-
Adding a request for this feature here for accessibility purposes as well -- namely with print media. it would be useful to be able to bulk update state to open all before calling |
Beta Was this translation helpful? Give feedback.
-
how is this not a thing yet? :( |
Beta Was this translation helpful? Give feedback.
-
Need this. |
Beta Was this translation helpful? Give feedback.
-
At the moment (judging by the number and frequency of topics) this is one of the most demanded features, it is so limiting in the use of this component that it is easier to write your own than to try to invent a crutch that will fix the existing one :( |
Beta Was this translation helpful? Give feedback.
-
+1 on this. I've also created my FAQ section with disclosures and I'd like to see all the answers when I print the page, regardless of original user selected state. |
Beta Was this translation helpful? Give feedback.
-
if you guys want to use Disclosure fully programmatically,
this makes Whether the element should ignore the internally managed open/closed state.
take a look at Disclosure.Panel |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm trying to do F.A.Q. section with a toggle-all button (as shown below)
I've tried it with
:default-open="show"
but doesn't seem to work. Is it possible to achieve it with current components?Using
@headlessui/vue
v1.2.0
Beta Was this translation helpful? Give feedback.
All reactions