F
Filament2mo ago
JG

Show both an infolist and a form on a RelationManager modal

If I define infolist() on a RelationManager class, I get a modal with an infolist. If I define form() I get a form. But if I define both, I don't get both but only the infolist. Any quick fix for this? Do I need to override the view for this or is there a simpler solution?
Solution:
GitHub
filament/packages/actions/resources/views/components/modals.blade.p...
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS. - filamentphp/filament
Jump to solution
2 Replies
JG
JGOP2mo ago
Hoped I could override this
protected function configureEditAction(Tables\Actions\EditAction $action): void
{
$action
->authorize(static fn (RelationManager $livewire, Model $record): bool => (! $livewire->isReadOnly()) && $livewire->canEdit($record))
->form(fn (Form $form): Form => $this->form($form->columns(2)));
}
protected function configureEditAction(Tables\Actions\EditAction $action): void
{
$action
->authorize(static fn (RelationManager $livewire, Model $record): bool => (! $livewire->isReadOnly()) && $livewire->canEdit($record))
->form(fn (Form $form): Form => $this->form($form->columns(2)));
}
with this
protected function configureEditAction(Tables\Actions\EditAction $action): void
{
$action
->authorize(static fn (RelationManager $livewire, Model $record): bool => (! $livewire->isReadOnly()) && $livewire->canEdit($record))
->infolist(fn (Infolist $infolist): Infolist => $this->infolist($infolist->columns(2)))
->form(fn (Form $form): Form => $this->form($form->columns(2)));
}
protected function configureEditAction(Tables\Actions\EditAction $action): void
{
$action
->authorize(static fn (RelationManager $livewire, Model $record): bool => (! $livewire->isReadOnly()) && $livewire->canEdit($record))
->infolist(fn (Infolist $infolist): Infolist => $this->infolist($infolist->columns(2)))
->form(fn (Form $form): Form => $this->form($form->columns(2)));
}
but no success
Solution
JG
JG2mo ago
GitHub
filament/packages/actions/resources/views/components/modals.blade.p...
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS. - filamentphp/filament
Want results from more Discord servers?
Add your server