Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to use setAttribute() at the group level, rather than the element level? #121

Closed
npw1982 opened this issue Nov 21, 2022 · 3 comments
Closed
Labels
enhancement New feature or request

Comments

@npw1982
Copy link

npw1982 commented Nov 21, 2022

Is your feature request related to a problem? Please describe.
When using Alpine x-show on an element, via the ->setAttribute() method. We can show and hide an input control, but this leaves the form group (e.g label) visible, is there a way to apply setAttribute() to the group instead of the input?

Describe the solution you'd like
A parameter or separate method that applies the attribute to the parent instead of the input.

Describe alternatives you've considered
Not using the autogrouping would get you part of the way there, but seems a shame to lose the autogrouping feature.

@npw1982 npw1982 added the enhancement New feature or request label Nov 21, 2022
@npw1982
Copy link
Author

npw1982 commented Nov 23, 2022

Or is there a way to access the child element attributes from the published group blade view that I am missing as
({{ $element }} is already html encoded in the group.blade.php)

@inxilpro
Copy link
Contributor

Does the answer in #120 work?

@npw1982
Copy link
Author

npw1982 commented Nov 29, 2022

It does thankyou, think that would be a really useful addition to the docs :) but its visible in the discussion now. Thanks very much for this!

@npw1982 npw1982 closed this as completed Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants