F
Filament11mo ago
Jessy

How to add tooltip to CheckboxList component

Hi, is there a method to add tooltip to a CheckboxList component?
2 Replies
LH
LH11mo 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
JessyOP11mo ago
it's Forms\Components\CheckboxList

Did you find this page helpful?