Why Alpine Headless component Disclosure doesn't have 'open()' function ? #3879
joffreypersia
started this conversation in
3. Feature Ideas
Replies: 1 comment 2 replies
-
|
You can use model on it to sync it with an external value. It is curious that open and toggle aren't exposed. |
Beta Was this translation helpful? Give feedback.
2 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am reading the doc here: https://alpinejs.dev/component/headless-disclosure/docs
and I don't understand why there are only two properties :
isOpen | A boolean used to determine whether or not the disclosure is currently open
close | A method used to programatically close the disclosure
I would be interested to have an open(), too. I was forced to rewrite the function by hand and never use the disclosure element properly because of the lack of properties.
Like having a default state Open or Close at load (to avoid the transition of opening the disclosure when the page loads) and having the possibility to open or close a disclosure with JS without simulating a dumb click.
Why Caleb? 😅
Beta Was this translation helpful? Give feedback.
All reactions