summaryrefslogtreecommitdiff
path: root/src/Columns
diff options
context:
space:
mode:
Diffstat (limited to 'src/Columns')
-rw-r--r--src/Columns/Column.php6
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);
}