© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•16mo ago•
1 reply
Hugo

Modal Footer Action closes modal ,opens another modal then reset arguments

Hello. I am trying to have an action create a temporary record and then open another modal to fill extra data.
So far I've made it work like so

->action(function ($data, $arguments,$livewire, $action) {
                    if($arguments['withoutSizes'] ?? false){
                        $record = CreateArticleTypeAction::fromArray($data);
                      $livewire->replaceMountedTableAction('create_sizes', (string)$record->id, ['without_sizes' => true]);
                    }
                })
->action(function ($data, $arguments,$livewire, $action) {
                    if($arguments['withoutSizes'] ?? false){
                        $record = CreateArticleTypeAction::fromArray($data);
                      $livewire->replaceMountedTableAction('create_sizes', (string)$record->id, ['without_sizes' => true]);
                    }
                })

This second modal that is an row action on my table, will change it's form depending on the $arguments (whether is comes from a previous modal or if the users click on the row action).
My problem now is that after submitting the second action modal form, I would like to reset the arguments of the action (so that if the user clicks on the row action, the form is the default one). These arguments were set above:
$livewire->replaceMountedTableAction('create_sizes', (string)$record->id, ['without_sizes' => true]);
$livewire->replaceMountedTableAction('create_sizes', (string)$record->id, ['without_sizes' => true]);


on the second action, on the ->action method, i've tried to $action->resetArguments(); or even $livewire->getMountedTableAction()->resetArguments(); and after dumping the arguments they appear to have been reseted but when I press on the row action, the form still has the same format as if it still has $arguments. This behavior only changes after refreshing the page, but I would like to avoid it and have it dynamically change.

I've thought about other solutions like creating an hidden action with that specific form but I would like to know if there is a way to do what i am trying to.
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

Updating record via modal footer action
FilamentFFilament / ❓┊help
3y ago
Modal Footer
FilamentFFilament / ❓┊help
2y ago
Charts crash after Action Modal closes
FilamentFFilament / ❓┊help
3y ago
Tab closes as soon as the Modal Opens!
FilamentFFilament / ❓┊help
10mo ago