Ability to close Disclosure Panel
See original GitHub issueAre there plans to add the following to the Disclosure component?
- Close on click outside
close
on the render prop object so we can close the disclosure from a button with it
Or should I be managing the open/closed state in my parent component?
Thanks for the help
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top Results From Across the Web
HeadlessUI: Disclosure. Part 3 - JavaScript in Plain English
In this part, we are going to create a custom component as Disclosure Button. So when the user click on MyLink button. It...
Read more >Feature: Close Disclosure Manually · Discussion #475 - GitHub
I store the close function from the currently opened panel as ref and call it when the next panel opens. My solution comes...
Read more >React.js: How to close headlessui Disclosure modal from code?
I encountered an issue trying to close the headlessui Disclosure modal inside the panel. My goal is to have a button inside the...
Read more >Texas Medical Disclosure Panel – Frequently Asked Questions
Can the provider delete information or text from the Panel's consent forms?
Read more >Federal Mortgage Disclosure Requirements under the Truth in ...
Regulation Z therefore limits creditors' ability to provide revised Loan Estimates relative to the provision of the Closing Disclosure and to consummation.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Gotcha! I would recommend to use a Popover for that (https://github.com/tailwindlabs/headlessui/tree/develop/packages/@headlessui-react#popover). It is built on top of the Disclosure pattern, but it has “outside click” and “escape” to close functionality.
I’ll make sure that I add a list of features for each component and when to use them to the docs!
Hey @RobinMalfait,
Sorry to hijack an old issue but I was just wondering, in your FAQ example above is it possible to have Disclosure Panels close other panels when they’re opened? I.e I click on a new FAQ and it closes the last one that I had open.
Thanks Giles