FilamentF
Filament7mo ago
valeum

Infolist RepeatableEntry with an Array

Hello everyone,

I've already searched through the documentation and various sources, but unfortunately I couldn't find a solution to my problem.

I'm trying to display dynamic data within an Infolist using RepeatableEntry. Here is a minimal example of my code:

Infolists\Components\RepeatableEntry::make('custom_links')
    ->label('Links')
    ->getStateUsing(fn() => [
        ['label' => 'Google', 'url' => 'https://google.com'],
        ['label' => 'GitHub', 'url' => 'https://github.com'],
    ])
    ->schema([
        Infolists\Components\TextEntry::make('label')->label('Title'),
        Infolists\Components\TextEntry::make('url')->label('Link'),
    ]),

Even with this static array, nothing is displayed. In the next step, I would like to use $record to access the current record's data dynamically.

Does anyone know if this is possible in general, and if so, what I'm doing wrong here?

Thank you very much for your help!
Was this page helpful?