diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Columns/Column.php | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |