© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
DivDax

Action inside Resource ViewAction blade view

Hey!

I have a ViewAction on my
ClientResource
ClientResource
Table. Inside the 
show-client
show-client
view, I load the 
client-info
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])),
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>
<div>
    <livewire:client-info :$client />
</div>


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

    <x-filament-actions::modals />
</div>
<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(),
            ]);
    }
}
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(),
            ]);
    }
}
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Click ViewAction in RelationManager to view resource
FilamentFFilament / ❓┊help
14mo ago
how use viewData value at ViewField in the blade view
FilamentFFilament / ❓┊help
3y ago
Action Modals not showing inside ViewRecords
FilamentFFilament / ❓┊help
5mo ago
Performing action on resource view event
FilamentFFilament / ❓┊help
2y ago