Merge pull request #17753 from filamentphp/Render-html-in-column-manager-label

Render html in column manager
This commit is contained in:
Dan Harrin
2025-09-14 13:35:00 +01:00
committed by GitHub
2 changed files with 8 additions and 6 deletions
@@ -81,7 +81,7 @@
/>
@endif
<span x-text="column.label"></span>
<span x-html="column.label"></span>
</label>
@if ($hasReorderableColumns)
@@ -131,7 +131,7 @@
@endif
<span
x-text="groupColumn.label"
x-html="groupColumn.label"
></span>
</label>
@@ -165,7 +165,7 @@
/>
@endif
<span x-text="column.label"></span>
<span x-html="column.label"></span>
</label>
@if ($hasReorderableColumns)
@@ -197,10 +197,12 @@ trait HasColumnManager
*/
protected function mapTableColumnGroupToArray(ColumnGroup $group): array
{
$label = e($group->getLabel());
return [
'type' => self::TABLE_COLUMN_MANAGER_GROUP_TYPE,
'name' => (string) $group->getLabel(),
'label' => (string) $group->getLabel(),
'name' => $label,
'label' => $label,
'isHidden' => empty(array_filter($group->getColumns(), fn (Column $column): bool => ! $column->isHidden())),
'isToggled' => true,
'isToggleable' => true,
@@ -219,7 +221,7 @@ trait HasColumnManager
*/
protected function mapTableColumnToArray(Column $column): array
{
$label = (string) $column->getLabel();
$label = e($column->getLabel());
if (blank($label) && $this->hasReorderableTableColumns()) {
throw new LogicException("The table column [{$column->getName()}] has a blank label. All columns must have labels when they are reorderable.");