Why this RepeatableEntry code doesn't work as expected
The list shows up properly, but when I click in the action I get:
An attempt was made to evaluate a closure for [Filament\Infolists\Components\Actions\Action], but [$id] was unresolvable.
I am trying to get the value of 'id' in the current component action.
I also tried other stuff like $state or injecting Get and some desperate random stuff...Nothing seems to work.
The only thing that gives sings if working is:
But this gives me an empty array.
2 Replies
For anybody interested, I fix it by createing the action clousure like this:
Here is the full code:
This seems a bit gross to me, probably there is a better way...
@ElCoco I am having same issue. You can do this also like,
->action(function (array $data, $record) {
dd($record);
But the problem is, if there are more than one records, it returns the last one only.
Do you know how to overcome this issue?