F
Filament15mo ago
F alko

HTML in tooltip for table columns

Is there a reason why some tooltips support HTML and other don't? I need some line breaks in there, and thought nl2br would be my best bet..
2 Replies
Patrick Boivin
Patrick Boivin15mo ago
Can you share the code you've been trying?
ckangwei83
ckangwei836mo ago
forwhoever needed this, below method works for me. it is not working when doing x-tooltip.html or x-tooltip.raw alone. But somehow defined an empty x-tooltip.html will make the raw works with html. TextColumn::make('name') ->html()
->extraAttributes(fn (Model $record): Array => [ 'x-tooltip.html' => new HtmlString(), 'x-tooltip.raw' => new HtmlString(implode('<br>- ', ($record->whatever ?? ['-']))), ]),
Want results from more Discord servers?
Add your server