Infolist TextEntry is stripping my SVG icons
I have the following code in my resource:
Then I have this code in my view:
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 closureSolution:Jump to solution
record should be tasks.. did you try something like this?
```php
RepeatableEntry::make('incompleteTasks')
->schema([...
12 Replies
Try to wrap the view in a
new HtmlString(view(...)->render())
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 closureI think it's just
$record
or $getRecord()
?
Or $this->record
?Try to wrap the view in a new HtmlString(view(...)->render())
This did not work. I think it's because the icons are not being stripped by the closure. They seem to be removed by the TextEntry
component.
I think it's just$record
or$getRecord()
?
$getRecord()
contains the parent model, in this case, Customer. I'm looping through tasks associated with a customer.Try ->html() on the TextEntry
It already has that
Sorry. Missed that. Have you tried using a ViewEntry instead seems weird to return a view as the state to me.
He tried but didn’t know how to get the current repeater record. I am not sure either.
Wow. It’s even on the question. I obviously don’t need to be helping anyone today. Sorry. Lol.
Solution
record should be tasks.. did you try something like this?
He tried.
$getRecord()
returns the customerIt was supposed to be task 🤔
Haven't verified
Hold on. Let me try that again
I'm sorry guys. I must have been doing something wrong. I've tried
$getRecord()
and now I'm getting the task. I'm sorry for wasting your time.
Thanks for helping 🙏