It seems like you're trying to display a list of attendees within the RepeatableEntry component in Filament. The issue you're facing is that the TextEntry component is not being populated with the actual attendee names.
To fix this, you need to ensure that the schema for the RepeatableEntry component is correctly set up to display the data for each attendee. You should use the statePath property to bind each TextEntry to the corresponding field in the attendee data.
Here's how you can modify your RepeatableEntry to display the attendee names:
InfoListSection::make('Attendees')
->grow(false)
->schema([
Split::make([
RepeatableEntry::make('Who is attending')
->state(function (Event $event) {
$id = $event->getKey();
$events = $event->eventUser()->where('event_id', $id)->get();
$attendees = $events->map(function ($user) {
return [
'id' => $user->id,
'name' => $user->name,
'created_at' => $user->created_at->format('Y-m-d H:i:s'),
];
})->toArray();
return $attendees;
})
->schema([
TextEntry::make('name')
->statePath('name') // Bind the TextEntry to the 'name' field of the attendee
])
->contained(false)
])
])
->columnSpanFull()
->from('md');
In this code, the TextEntry component is bound to the name field of each attendee by using the statePath method. This tells the TextEntry component where to find the value it should display within the repeatable state.
Now, when you render the InfoListSection, it should correctly display the names of the attendees in the TextEntry components within the RepeatableEntry.