F
Filamentโ€ข4w ago
frame

Access current item in RepeatableEntry

Is there something between $record (all the items) and $state (a field of the current item) in RepeatableEntry? I can access another field if I add a hidden entry for it and reference that entry with $get, but maybe there's a better way? ๐Ÿ˜บ
RepeatableEntry::make('items')
->schema([
TextEntry::make('type')
->hidden(),
TextEntry::make('link')
->hidden(),
TextEntry::make('name')
->label(fn (Get $get) => $get('type'))
->url(fn (Get $get) => $get('link')),
]),
RepeatableEntry::make('items')
->schema([
TextEntry::make('type')
->hidden(),
TextEntry::make('link')
->hidden(),
TextEntry::make('name')
->label(fn (Get $get) => $get('type'))
->url(fn (Get $get) => $get('link')),
]),
2 Replies
Shavik
Shavikโ€ข3w ago
I also am curious to know how to do this. I feel this used to work in v3. We've had some regressions in our app since upgrading on places we were using the $record in the schema/infolist components.
frame
frameOPโ€ข3w ago
It turns out $record is the row item when injected within a repeatableentry ๐Ÿ˜…

Did you find this page helpful?