Replies: 2 comments 1 reply
-
Further to this, is there a way to use setAttribute() at the group level, rather than the element level? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Right now the best way to do this is just using {{ Aire::submit()
->disabled()
->class('btn btn-gray cursor-not-allowed')
->setAttribute('x-bind:class', '{ "btn-gray cursor-not-allowed": !requestable, hidden: saving }')
->setAttribute('x-bind:disabled', '!requestable') }} As for setting attributes on the group, I think |
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
-
Hi all,
Am scoping Aire at the moment and it looks great, just checking it against our existing components and wondered if anyone had any neat ways they implement dynamically showing and hiding controls using Alpine in Aire?
We do something similar in our current views with x-show and x on-change that hides the input group, but wondered if anyone had a neat implementation they wouldn't mind sharing an example of (done in an aire-ish way?).
Thanks,
Neil
PS - a way of managing this via Aire methods in future would make this an absolute no brainer to use on everything!
Beta Was this translation helpful? Give feedback.
All reactions