ActionGroup Action caching custom view

What I am trying to do: I am trying to open a custom view in an Action Modal inside an Action Group What I did: I simply followed this example https://filamentphp.com/docs/3.x/actions/modals#passing-data-to-the-custom-modal-content. My issue/the error: After I open one modal, the following modals that I open, have the same content as the first one, might be some caching mechanism but I can't figure out why it is doing that. The big difference is, if I put the action outside the action group, it will properly open the content without "caching" it in the following openings. Code:
ActionGroup::make([
Action::make('payment_history')
->action(fn (Payment $record) => $record->advance())
->modalContent(fn (Payment $record): View => view(
'livewire.payments.modals.history',
['payment' => $record],
))
])
ActionGroup::make([
Action::make('payment_history')
->action(fn (Payment $record) => $record->advance())
->modalContent(fn (Payment $record): View => view(
'livewire.payments.modals.history',
['payment' => $record],
))
])
1 Reply
Paul
Paul2mo ago
Did you end up finding a workaround for this. I have the same problem and can pinpoint it down to the 3.3.19 update if (!$event.detail?.id?.startsWith('{{ $this->getId() }}-')) { return } seems to prevent the modal from resetting. For now i need to revert back to 3.3.18 - this allows it to show the correct modal

Did you find this page helpful?