F
Filament4mo ago
Jessy

How to add tooltip to CheckboxList component

Hi, is there a method to add tooltip to a CheckboxList component?
2 Replies
LH
LH4mo ago
@Jessy Don't know if it is Checkbox in form or table. But the way I do it
->tooltip(function (Tables\Columns\CheckboxColumn $column): ?string {
$state = $column->getState();

if ($state) {
return 'In stock';
}

return 'Out of stock';
})
->tooltip(function (Tables\Columns\CheckboxColumn $column): ?string {
$state = $column->getState();

if ($state) {
return 'In stock';
}

return 'Out of stock';
})
Jessy
Jessy4mo ago
it's Forms\Components\CheckboxList