Action inside Resource ViewAction blade view

Hey!

I have a ViewAction on my ClientResource Table. Inside the show-client view, I load the client-info Livewire component with an action.
When I click the button for the first time, nothing happens, but a Livewire update request is fired. On the second click, the modal opens.

Do you have any ideas on how to fix that?

ViewAction::make()
  ->slideOver()
  ->modalWidth('w-full sm:max-w-7xl')
  ->modalHeading(fn($record) => __('Client') . ': ' . $record->full_name)
  ->extraModalFooterActions([
      (new ClientEditAction())->editAction(),
  ])
  ->form([])
  ->modalContent(fn($record) => view('show-client', ['client' => $record])),


show-client.blade.php
<div>
    <livewire:client-info :$client />
</div>


client-info.blade.php
<div>
    {{ $this->createAppointmentAction() }}

    <x-filament-actions::modals />
</div>


ClientInfo.php
class ClientInfo extends Component implements HasActions, HasForms, HasTable, HasInfolists
{
    use InteractsWithActions;
    use InteractsWithInfolists;
    use InteractsWithForms;
    use InteractsWithTable;

    public Client $client;
    
    public function createAppointmentAction(): CreateAction
    {
        return CreateAction::make('createAppointment')
            ->form([
                AppointmentForm::make(),
            ]);
    }
}
Was this page helpful?