© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
1 reply
mohdaftab

extraFieldWrapperAtrributes class display hide using AlpineJs

Hello,

I am using AlpineJs to hide/show some Input fields for speeding up the forms and it works great so far but one thing I noticed is that even after using x-show to false for the extraFieldWrapperAttribute it hides the input field but leaves the gap which is set by its grand-parent element as you can see in the screenshot I posted.
I tried to hide it using

$refs.recipients.parentNode.style.display = (show_recipients) ? "block":"none";

and it worked but the gaps comes back if there is any on change event occurs on ->live() input field.

Please let me know how can I hide this parent div properly?

Thank you.
image.png
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Change filament button display/icon in alpinejs?
FilamentFFilament / ❓┊help
2y ago
Action with AlpineJS
FilamentFFilament / ❓┊help
3y ago
Custom AlpineJS validation
FilamentFFilament / ❓┊help
3y ago
How to "rerender" custom elememts in blade using alpinejs
FilamentFFilament / ❓┊help
15mo ago