F
Filament14mo ago
MeniV

Sorting repeatableEntry

Is it possible to sort a repeatableEntry in an Infolist using data from a relationship? I would like to sort using 'startdate' from a relationship called 'documents':
RepeatableEntry::make('persons') // relationship persons
->schema([
TextEntry::make('datum')
->getStateUsing(fn($record) => $record->documents()->pluck('startdate'))
->date('d-m-Y'),
TextEntry::make('fullname')
->getStateUsing(fn($record) => $record->fullname()),
RepeatableEntry::make('persons') // relationship persons
->schema([
TextEntry::make('datum')
->getStateUsing(fn($record) => $record->documents()->pluck('startdate'))
->date('d-m-Y'),
TextEntry::make('fullname')
->getStateUsing(fn($record) => $record->fullname()),
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server