EditAction inside Action

Hey!

I try to open an edit action from an action:

return Action::make('showAction')
  ->slideOver()
  ->modalWidth('w-11/12 md:w-3/4')
  ->modalContent(fn (Action $action) => view(
      'livewire.appointment-show-action',
      [
          'action' => $action,
          'appointment' => $appointment,
      ]
  ))
  ->registerModalActions([
      EditAction::make('editClient')
          ->record($appointment->client)
          ->form([ClientForm::make()])
          ->slideOver(),
  ])


When i click the edit button inside my slideover i get this error:
Error:
Filament\Actions\EditAction::Filament\Actions\{closure}(): Argument #2 ($record) must be of type Illuminate\Database\Eloquent\Model, null given, called in /var/www/app/vendor/filament/support/src/Concerns/EvaluatesClosures.php on line 35


any ideas?
Was this page helpful?