Stockholm
Stockholm
FFilament
Created by Stockholm on 1/30/2024 in #❓┊help
Open a filament modal in beforeCreate() lifecycle hook
I finally remembered it was mountAction() I was looking for.
//use Filament\Actions\Action;

public function fooAction(): Action
{
return Action::make('foo');
//->action(...)
}

protected function beforeCreate(): ?Action
{
if (true) {
$this->mountAction('foo');
$this->halt();
}
}
//use Filament\Actions\Action;

public function fooAction(): Action
{
return Action::make('foo');
//->action(...)
}

protected function beforeCreate(): ?Action
{
if (true) {
$this->mountAction('foo');
$this->halt();
}
}
3 replies