Fire js event from SelectColumn

I cannot seem to fire an event from SelectColumn in v2. of filament.
Tables\Columns\SelectColumn::make('status')
->action(function ($record, $livewire) {
dd('nothing works here');
})
Tables\Columns\SelectColumn::make('status')
->action(function ($record, $livewire) {
dd('nothing works here');
})
Even when inspecting the console there doesn't seem to be any events triggered at all with the select column change. effects.dirty[] How can I trigger a js event when I change the dropdown here?
3 Replies
mvenghaus
mvenghaus9mo ago
you could use afterStateUpdated instead of action
bionary
bionaryOP9mo ago
@mvenghaus that method isnt available on SelectColumn (F v.2) Method Filament\Tables\Columns\SelectColumn::afterStateUpdated does not exist.
mvenghaus
mvenghaus9mo ago
this works for me
Tables\Columns\SelectColumn::make('test')
->options([1 => 'one', 2 => 'two'])
->afterStateUpdated(fn($state) => dd($state)),
Tables\Columns\SelectColumn::make('test')
->options([1 => 'one', 2 => 'two'])
->afterStateUpdated(fn($state) => dd($state)),
ah .. v2 🙂 overlooked that then i can't help you .. never used v2 sry
Want results from more Discord servers?
Add your server