Custom Action on custom column.

Hello everyone, Is there any way to add custom action on custom column:
use Filament\Tables\Actions\Action;
use Filament\Tables\Columns\Column;

class CustomColumn extends Column
{
public function getCustomAction(): ?Action
{
return Action::make('customAction')
->form([
TextColumn::make('name')
]);
}
}
use Filament\Tables\Actions\Action;
use Filament\Tables\Columns\Column;

class CustomColumn extends Column
{
public function getCustomAction(): ?Action
{
return Action::make('customAction')
->form([
TextColumn::make('name')
]);
}
}
<div>
{{ $getState() }}
{{ $getCustomAction() }}
</div>
<div>
{{ $getState() }}
{{ $getCustomAction() }}
</div>
It shows the button but not trigger the modal why ?
5 Replies
Asmit Nepali
Asmit NepaliOP4d ago
Any Idea ?
LeandroFerreira
why not just use an Action?
Asmit Nepali
Asmit NepaliOP4d ago
Hey @LeandroFerreira, thanks for the reply! My use case is: I have a column, and if there's no value in it, I want to show a + icon. When the user clicks that icon, a modal should open. Do you have any suggestions on how I can achieve this? Thanks again
Asmit Nepali
Asmit NepaliOP4d ago
Thanks @LeandroFerreira! I’ll give this a try and let you know how it goes. Appreciate the help!

Did you find this page helpful?