FilamentF
Filament2y ago
IWBW

Infolist TextEntry is stripping my SVG icons

I have the following code in my resource:
RepeatableEntry::make('incompleteTasks')
    ->hiddenLabel()
    ->schema([
        TextEntry::make('title')
            ->hiddenLabel()
            ->html()
            ->state(function (Task $record) {
                return view('filament.pages.task-list-item', ['task' => $record]);
            }),
        // Other entries
        ]),
]),

Then I have this code in my view:
<p class="flex items-center text-muted text-gray-600 dark:text-gray-400 font-small mt-1">
    <x-heroicon-o-clock class="h-4 w-4 me-1 text-primary-500" />Some stuff here | <x-lineawesome-user-tie-solid class="h-4 w-4 mx-1 text-primary-500" /> Other stuff here 
</p>

When I dd() the view, the icons are there in the HTML, but when the entry is rendered, they are not. Is there something I can turn off to stop that behavior?
In case you are wondering, I'm not using the ViewEntry because I could not figure out how to share the current Task with the view. viewData() does not accept a closure
Solution
record should be tasks.. did you try something like this?

RepeatableEntry::make('incompleteTasks')
->schema([
    ViewEntry::make('title')
    ->view('custom-entry')
])


<!-- custom-entry.blade.php -->
<div>
    {{ $getRecord() }}
</div>
Was this page helpful?