Get record values in Livewire component with Filament Table
Hello everyone. I have inserted a Filament table inside a Livewire component.
One of the fields is of type TextInputColumn, but I would like the same to have the disabled() option at a certain condition, which though depends on the value of the selected record.
Can this be done? Unfortunately, I could not find any details about it.
Here's my code and my idea:
Obviously, for now
$record->slug
returns an error.
Thank you!2 Replies
You need to use a callback. And you can inject the record there.
->disabled(fn ($record) => $record)
Assuming disabled exists on TextInputColumn
Thank you so much, I'll try right away!
Hi Adam, worked as a charm. Sometimes I forget how versatile Filament is! Thanks for the help.
I leave here the solution for others: