© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
8 replies
ganucoding

Why Select multiple & TagsInput afterStateUpdated() not triggering

- I'm trying to wire:model.blur my users field using Select()->multiple()->options([])->live(onBlur: true)->afterStateUpdated().
- I tried live(onBlur: true)->afterStateUpdated() using other input like TextInput, Select (single option), Radio. And those inputs work just fine.

- Example of working code (using TextInput):
when I un-focus the name field, it will run the afterStateUpdated method and save the updated data in db.
TextInput::make('name')
->label('Name:')
->live(onBlur: true)
->afterStateUpdated(function (Model $record, ?string $state) {
  $record->update(['name' => $state]);
}),
TextInput::make('name')
->label('Name:')
->live(onBlur: true)
->afterStateUpdated(function (Model $record, ?string $state) {
  $record->update(['name' => $state]);
}),


- NOT WORKING:
afterStateUpdated method not even triggered, when I select/deselect. Nothing seems to work.
Select::make('users')
->label('Users:')
->multiple()
->options([
  'test1' => 'Test One',
  'test2' => 'Test Two',
  'test3' => 'Test Three'
])
->searchable()
->live(onBlur: true)
->afterStateUpdated(function (Model $record, $state) {
  $record->update(['users' => $state]);
}),
Select::make('users')
->label('Users:')
->multiple()
->options([
  'test1' => 'Test One',
  'test2' => 'Test Two',
  'test3' => 'Test Three'
])
->searchable()
->live(onBlur: true)
->afterStateUpdated(function (Model $record, $state) {
  $record->update(['users' => $state]);
}),


Any suggestions?
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

multiple() select not work with afterStateUpdated
FilamentFFilament / ❓┊help
2y ago
TagsInput afterStateUpdated() doesnt work
FilamentFFilament / ❓┊help
3y ago
afterStateUpdated() not triggering on TextInput
FilamentFFilament / ❓┊help
3y ago
Triggering afterStateUpdated() with $set()?
FilamentFFilament / ❓┊help
17mo ago