summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Light <samlight1994@gmail.com>2025-09-24 00:33:45 +0100
committerSam Light <samlight1994@gmail.com>2025-09-24 00:33:45 +0100
commit7a47bae6e469fd04d6a14bda1646f8317d8f3bb4 (patch)
treea4d40b3c6b2db1dc42d046ebe42c791ceb164a8d /src
parent2a349e8a4222b76724ed21626f332e9f3237318f (diff)
Made column display html from HtmlStringv1.3.1
Diffstat (limited to 'src')
-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);
}