© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•10mo ago•
1 reply
soand

$livewire->dispatch('refresh') not updating data

Hi all!

I have a form where some of the form is in it's own section, where I've used the footerActions on the form to allow the user to save some of the form data.
But when saving the data in that action, the form doesn't rerender or reload or show any updates. I could find some posts in here mentioning using the $livewire->dispatch('refresh') which sort of works, but it doesn't update the latest changes, only the second latest if that makes sense?

an example:
Section::make()->schema([
  App\Models\Test::all()->map(fn ($test) => return TextInput::make('test_'.$test->id)->disabled(fn() => $test->closed_at));
])->footerActions([
  Action::make('save')
    ->label('Save')
    ->action(function($get, $livewire) {
      $tests = App\Models\Test::all();
      foreach($tests as $test) {
        $value = $get('test_' . $test->id);
        $test->update(['value' => $value, 'closed_at' => now()]);
        $livewire->dispatch('refresh')
      }
    })
]);
Section::make()->schema([
  App\Models\Test::all()->map(fn ($test) => return TextInput::make('test_'.$test->id)->disabled(fn() => $test->closed_at));
])->footerActions([
  Action::make('save')
    ->label('Save')
    ->action(function($get, $livewire) {
      $tests = App\Models\Test::all();
      foreach($tests as $test) {
        $value = $get('test_' . $test->id);
        $test->update(['value' => $value, 'closed_at' => now()]);
        $livewire->dispatch('refresh')
      }
    })
]);

When i input the value in the first field and press save, it saves the information but it doesn't update the "disabled" to true, but when i just continue also inputting data in the next field and pressing save, the first field os now disabled but not the one I've just updated
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

404 after dispatch livewire event
FilamentFFilament / ❓┊help
13mo ago
Filter question with livewire dispatch
FilamentFFilament / ❓┊help
2y ago
Why is livewire dispatch not triggering the function?
FilamentFFilament / ❓┊help
6mo ago
dispatch in livewire 3 and filament
FilamentFFilament / ❓┊help
15mo ago