Buroflow Dev
Buroflow Dev
FFilament
Created by Buroflow Dev on 8/14/2023 in #❓┊help
tooltip
Hi @awcodes , That was the first thing I tried. It will only display as plain text, i.e.: x-tooltip.raw. That's what led me on this interesting quest. ->tooltip() default (x-tooltip.raw) is overriding everything. I found another discussion about quotes are encoded in tooltip where Dan mentioned: the fix needs to be in button.blade.php, this line should be x-tooltip="@js($tooltip)" https://discord.com/channels/883083792112300104/1090010932748492800/1090224724510003201 I don't see that in my version of Filament. Any suggestions on how to hook or filter ->tooltip() to do html ie: x-tooltip.htm ? I can supply the getAdditionalInfo() method and the output to display in the tooltip. I really don't want to have to go with a modal approach. Tooltip is a simpler UI experience for these guys. Thanks for the interest and help so far!
12 replies
FFilament
Created by Buroflow Dev on 8/14/2023 in #❓┊help
tooltip
This produces a tooltip, but no content in it. Change x-tooltip.html to x-tooltip.raw and the content shows.
12 replies
FFilament
Created by Buroflow Dev on 8/14/2023 in #❓┊help
tooltip
Hi @Dennis Koch , Okay. I removed the tooltip() from the field and added the x-tooltip.html as shown. Here's the TextColumn: TextColumn::make('loc_id')->label('Loc ID') ->extraAttributes([ 'class' => 'p-px text-sm', 'x-data' => '{}', 'x-tooltip.html' => new HtmlString('<h1>Hello World</h1>'), ]) ->default('N/A') // ->tooltip(function (TextColumn $column): ?string {
// $state_locID = $column->getState(); // $additionalInfo = $this->getAdditionalInfo($state_locID); // Get additional info based on "loc_id" // return $additionalInfo; // }) ->sortable() ->searchable(),
12 replies
FFilament
Created by Buroflow Dev on 8/14/2023 in #❓┊help
tooltip
Hi @pboivin , Thanks for that. The x-tooltip.html doesn't override the tooltip() default: x-tooltip.raw. When I add this as x-tooltip.html in the extraAttributes(), the tooltip displays, but no content. If I change it to x-tooltip.raw it works. Content displays, but no formatting. I'm displaying an array from a JSON file so I need at least new lines to separate the fields for easier reading. Do I need to change something in Filament?
12 replies