From 7a47bae6e469fd04d6a14bda1646f8317d8f3bb4 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Wed, 24 Sep 2025 00:33:45 +0100 Subject: Made column display html from HtmlString --- src/Columns/Column.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Columns/Column.php b/src/Columns/Column.php index 0638490..aa64ac5 100644 --- a/src/Columns/Column.php +++ b/src/Columns/Column.php @@ -24,7 +24,7 @@ class Column private bool $shouldEscape = true; /** - * @var ?Closure(Model, Column): string + * @var ?Closure(Model, Column): (HtmlString|string) */ private ?Closure $slotFn = null; @@ -144,6 +144,10 @@ class Column { $content = $this->slotFn === null ? $this->defaultSlot($row) : ($this->slotFn)($row, $this); + if ($content instanceof HtmlString) { + return $content->toHtml(); + } + return $this->escape($content); } -- cgit v1.2.3