© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
Miguel García

Toggle component afterStateUpdated event does not fire on false

Hi, the after state update event is not triggered when you switch from on ("1") to off (""). The Select component, when the 'placeholder' option is selected does not fire the event either. Is this a bug? Is there a way to fire the event when the Toggle is se to off?
Toggle::make('active')
  ->afterStateUpdated(function (Get $get, Set $set, ?string $old, ?string $state) {
  dd($state, $old);
})
->live(),
Toggle::make('active')
  ->afterStateUpdated(function (Get $get, Set $set, ?string $old, ?string $state) {
  dd($state, $old);
})
->live(),
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

Toggle afterStateUpdated not getting fired
FilamentFFilament / ❓┊help
3y ago
afterStateUpdated in toggle in a custom component not firering
FilamentFFilament / ❓┊help
14mo ago
Dispatch Event on AfterStateUpdated()
FilamentFFilament / ❓┊help
13mo ago
afterStateUpdated() not running on custom component
FilamentFFilament / ❓┊help
3y ago