Relation Manager Form - Adjust size/width

Is it possible to adjust Relation Manager Form size? Have a big screen and form modal width is about 50% screen width. I have tried to use $form->extraAttributes(['style' => 'width: 100%']) or add custom class the same way, but neither style or class does not appear at form container div.
No description
5 Replies
Michał Burdziak
Michał BurdziakOP2d ago
Bruno, unfortunately:
Method Filament\Forms\Form::modalWidth does not exist.
Method Filament\Forms\Form::modalWidth does not exist.
Bruno Pereira
Bruno Pereira2d ago
where are you calling it? it should be in the create action in the relationmanager create or whatever
Michał Burdziak
Michał BurdziakOP2d ago
Bruno, thank You very much, I have added such method to my Relation Manager and it worked!
protected function configureCreateAction(Tables\Actions\CreateAction $action): void
{
parent::configureCreateAction($action);
$action->modalWidth(MaxWidth::ScreenTwoExtraLarge);
}
protected function configureCreateAction(Tables\Actions\CreateAction $action): void
{
parent::configureCreateAction($action);
$action->modalWidth(MaxWidth::ScreenTwoExtraLarge);
}
Bruno Pereira
Bruno Pereira2d ago
oki

Did you find this page helpful?