@php use Filament\Support\Enums\MaxWidth; use Illuminate\Support\Js; $isRoot = $isRoot(); @endphp @foreach ($getComponents(withHidden: true) as $formComponent) @php /** * Instead of only rendering the hidden components, we should * render the `
` wrappers for all fields, regardless of * if they are hidden or not. This is to solve Livewire DOM * diffing issues. * * Additionally, any `
` elements that wrap hidden * components need to have `class="hidden"`, so that they * don't consume grid space. */ $isHidden = $formComponent->isHidden(); @endphp getMaxWidth()) { MaxWidth::ExtraSmall, 'xs' => 'max-w-xs', MaxWidth::Small, 'sm' => 'max-w-sm', MaxWidth::Medium, 'md' => 'max-w-md', MaxWidth::Large, 'lg' => 'max-w-lg', MaxWidth::ExtraLarge, 'xl' => 'max-w-xl', MaxWidth::TwoExtraLarge, '2xl' => 'max-w-2xl', MaxWidth::ThreeExtraLarge, '3xl' => 'max-w-3xl', MaxWidth::FourExtraLarge, '4xl' => 'max-w-4xl', MaxWidth::FiveExtraLarge, '5xl' => 'max-w-5xl', MaxWidth::SixExtraLarge, '6xl' => 'max-w-6xl', MaxWidth::SevenExtraLarge, '7xl' => 'max-w-7xl', default => $maxWidth, }, ]) > @if (! $isHidden) {{ $formComponent }} @endif @endforeach