Multi-select update events?

Hello people,
I have a multi-select form field that when a new items is added to it, does not trigger an event. I'm doing it like this:
 Select::make('users')
                    ->multiple()
                    ->relationship('users', 'name')
                    ->afterStateUpdated(function ($record, Select $component, $state) {
                        dd($state, $component, $record);
                        $record->users()->attach($state);
                    }),


Does anyone know how can I make the value addition/deletion update my record?

Thank you!
Was this page helpful?