FilamentF
Filament3y ago
Vp

infolist with RepeatableEntry

I want to display my infolist like dark img, If I have only one records then it's working perfectly. But If i add another content from admin then it display white image. Below are my code
public function albumLists(Infolist $infolist): Infolist
{
    return $infolist
        ->state([
            'albums' => $this->getTableRecords(),
        ])
        ->schema([
            RepeatableEntry::make('albums')
                ->hiddenLabel()
                ->schema([
                    Split::make([
                        Grid::make(1)
                            ->schema([
                                TextEntry::make('name')
                                    ->hiddenLabel(),
                                TextEntry::make('lyric_count')
                                    ->hiddenLabel(),
                                TextEntry::make('detail')
                                    ->hiddenLabel(),
                                RepeatableEntry::make('artists')
                                    ->schema([
                                        TextEntry::make('name')
                                            ->badge()
                                            ->hiddenLabel(),
                                    ]),
                            ]),
                        ImageEntry::make('image')
                            ->hiddenLabel()
                            ->grow(false),
                    ])->from('lg'),
                ]),
        ]);
}

public function table(Table $table): Table
{
    return $table
        ->query(
            Album::query()
                ->with('artists')
                ->withCount('lyric')
                ->latest()
        )
        ->paginated(['']);
}

What should I need to change, Last data only repeated while using this code, If I remove split and grid then I get actual record, but I (think) need this for what I want
Screenshot_from_2023-09-25_11-58-53.png
Screenshot_from_2023-09-25_12-06-46.png
Solution
Found this https://github.com/filamentphp/filament/issues/6964, can work around for now by passing closure
Was this page helpful?