Using suffix/prefix with html string

Adding a suffix looses the HtmlString object so it performs sanitization removing the tooltip.
Tables\Columns\TextColumn::make('total')
->html()
->formatStateUsing(fn (string $state) => new HtmlString("<span x-tooltip.raw='Example'>{$state}</span>"))
->suffix('test')
Tables\Columns\TextColumn::make('total')
->html()
->formatStateUsing(fn (string $state) => new HtmlString("<span x-tooltip.raw='Example'>{$state}</span>"))
->suffix('test')
This is a simplified example to show the issue we're actually overwriting the suffix for custom logic adding icons.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server