F
Filament15mo 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(['']);
}
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
No description
No description
Solution:
Found this https://github.com/filamentphp/filament/issues/6964, can work around for now by passing closure
Jump to solution
6 Replies
Vp
VpOP15mo ago
White image (which is only latest data repeated) with picture
No description
Vp
VpOP15mo ago
Without using split and grid it works, but I want image on right side..
No description
Vp
VpOP15mo ago
Bump
DrByte
DrByte15mo ago
I'm not sure, but what comes to mind is to explore which template is being used, and whether that template is honoring dark mode vs light, or if something about the loop that's being used is outside the right div/element/layer/etc. In short: is it a markup/template thing? Compare browser source between working vs not-working scenarios, and explore from there.
Vp
VpOP15mo ago
Hi, this is not about dark/white or template/layer thing, my problem using that code is it repeat only the last data if I use split or grid in repeatableEntry. If I didn't use those (split, grid) then it's working correctly.. Maybe a bug, i'll investigate more
Solution
Vp
Vp15mo ago
Found this https://github.com/filamentphp/filament/issues/6964, can work around for now by passing closure
Want results from more Discord servers?
Add your server