mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Merge pull request #17753 from filamentphp/Render-html-in-column-manager-label
Render html in column manager
This commit is contained in:
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user