is it possible to have ToggleColumn with text in filament v2?
Hello all,
In my form I have toggle field is_submitted like this and it works absolutely fine.
and this is the ToggleColumn in the table
I want to give the same text like 'Submitted' or 'Not Submitted' in the ToggleColumn of my table, is this acheiveable?
In my form I have toggle field is_submitted like this and it works absolutely fine.
Toggle::make('is_submitted')->label('Change here')->inline(false)->default(false)->reactive()
->afterStateUpdated(function ($state, $set){}) ->onColor('success')
->offColor('danger'),
Placeholder::make('status')->label('Currently')->content(function ($state, $get) {
$status = $get('is_submitted') === true ? 'Submitted' : 'Not Submitted';
$style = $status === 'Submitted' ? 'color: green;' : 'color: red;';
return new HtmlString("<span style='" . $style . "'>" . $status . "</span>");
})->extraAttributes(['class' => 'text-primary-500 mt-15 items-center font-bold text-xs']),and this is the ToggleColumn in the table
ToggleColumn::make('is_submitted')->label('Status')->onColor('success')
->offColor('danger'),I want to give the same text like 'Submitted' or 'Not Submitted' in the ToggleColumn of my table, is this acheiveable?

