CreateOptionForm Modal Width

How to adjust modal width when using createOptionForm()
7 Replies
einnlleinhatt_
einnlleinhatt_6mo ago
Mike
Mike2mo ago
any idea on this?
awcodes
awcodes2mo ago
You just have to use a combination of the action and the form
jepewsykes
jepewsykes2mo ago
->modalWidth('6xl') .
Mike
Mike2mo ago
@jepewsykes Method Filament\Forms\Components\Select::modalWidth does not exist.
Dan-webplusm
Dan-webplusm2mo ago
Why use this ? check the doc : https://discord.com/channels/883083792112300104/1183058929341714482/1232475553190252598
use Filament\Forms\Components\Actions\Action;
use Filament\Forms\Components\Select;

Select::make('author_id')
->relationship(name: 'author', titleAttribute: 'name')
->createOptionAction(
fn (Action $action) => $action->modalWidth('3xl'),
)
use Filament\Forms\Components\Actions\Action;
use Filament\Forms\Components\Select;

Select::make('author_id')
->relationship(name: 'author', titleAttribute: 'name')
->createOptionAction(
fn (Action $action) => $action->modalWidth('3xl'),
)