© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
mpiet

Action in custom modal content: Update modal content after action performed?

I have a page that renders records. I have an action to open a modal. I pass a subset of records to this modal action. I render the subset of records in the custom modal content. I also added an action to delete a single record. The overall page updates, and the record is removed. But inside the custom modal content I still see the record.

How can I update the modal content? Or make it reactive?

Here's some code:

{{
    ($this->editRates)([
        'rates' => $day['rates']
    ])
}}
{{
    ($this->editRates)([
        'rates' => $day['rates']
    ])
}}


public function editRates(): Action
{
    return Action::make('editRates')
        ->registerModalActions([
            $this->removeRate(),
        ])
        ->modalContent(
            function (Action $action) {
                return view('edit-rates', [
                    'action' => $action
                ]);
            }
        );
}
public function editRates(): Action
{
    return Action::make('editRates')
        ->registerModalActions([
            $this->removeRate(),
        ])
        ->modalContent(
            function (Action $action) {
                return view('edit-rates', [
                    'action' => $action
                ]);
            }
        );
}


@foreach($action->getArguments()['rates'] as $rate)
    <div>
        {{ ($action->getModalAction('removeRate'))([ 'id' => $rate['id'] ])  }}
    </div>
@endforeach
@foreach($action->getArguments()['rates'] as $rate)
    <div>
        {{ ($action->getModalAction('removeRate'))([ 'id' => $rate['id'] ])  }}
    </div>
@endforeach
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

Displaying a modal after action has been performed
FilamentFFilament / ❓┊help
3y ago
Using Torchlight in Action with custom modal content
FilamentFFilament / ❓┊help
3y ago
Refresh Table after performed action in Widget
FilamentFFilament / ❓┊help
2y ago
Refresh a modal after an extra footer action is performed?
FilamentFFilament / ❓┊help
2y ago