From de458fd4c4c6c39e647826d6652d942edcb2fe9b Mon Sep 17 00:00:00 2001 From: Luca Vicidomini Date: Wed, 10 Sep 2025 00:54:05 +0200 Subject: [PATCH] Add support for Htmlable to TableColumn --- packages/forms/src/Components/Repeater/TableColumn.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/forms/src/Components/Repeater/TableColumn.php b/packages/forms/src/Components/Repeater/TableColumn.php index 4d4b63c8b3..42190add1d 100644 --- a/packages/forms/src/Components/Repeater/TableColumn.php +++ b/packages/forms/src/Components/Repeater/TableColumn.php @@ -7,6 +7,7 @@ use Filament\Support\Components\Component; use Filament\Support\Concerns\CanWrapHeader; use Filament\Support\Concerns\HasAlignment; use Filament\Support\Concerns\HasWidth; +use Illuminate\Contracts\Support\Htmlable; class TableColumn extends Component { @@ -20,9 +21,9 @@ class TableColumn extends Component protected bool | Closure $isMarkedAsRequired = false; - public function __construct(protected string | Closure $label) {} + public function __construct(protected string | Htmlable | Closure $label) {} - public static function make(string | Closure $label): static + public static function make(string | Htmlable | Closure $label): static { $static = app(static::class, ['label' => $label]); @@ -38,7 +39,7 @@ class TableColumn extends Component return $this; } - public function getLabel(): string + public function getLabel(): string | Htmlable { return $this->evaluate($this->label); }