Set custom data on RepeatableEntry
I need to set custom data on RepeatableEntry:
I'm returning an array with the title, description, and notified fields, but the data isn't displayed. The total is loading correctly, though.
11 Replies
So 1. ->default() only works on creation not editing.
What do you mean totla? I can't see a total there?
I mean that in the view it shows me N elements (that really exist) but it does not set the values.

It's a ViewAction:
I've not used that particular function, but I suspect it's how you are connecting the state.
View action will load the data from the record. On the view, papers will be the relationship, if you remove the state and ensure the papers relationchip of the record is returned correctly, does that work?
The thing is, I don't really have a relationship (I guess that's why it doesn't work), I have a custom array of elements that I get from a relationship.
But you do? If you are getProcessedNews that is the relationship? no?
no. this is a function:
Right ok, if you dd on your collect what do you get in the state
I have this:
array:137 [▼ // app/Filament/Admin/Resources/ExecutionResource.php:123
0 => array:3 [▼
"title" => "Zukünftige Regierung plant Elektroauto-Förderung"
"description" => "
Der Preisabstand zwischen neuen E-Autos und Verbrennern sinkt. Jetzt hat die zukünftige Bundesregierung eine E-Auto-Förderung angekündigt. Auch aus anderen Grün
▶
"
"notified" => true
]
1 => array:3 [▶]
Yeah it looks good and i tested it too, it would apear at present it only works with eloquent results.