How can I get the current relative $record from within the RepeatableEntry? #12814
-
PackageInfolist builder Package Versionv3 How can we help you?If I use state() on infolists's RepeatableEntry to get current record in it gives parent record, not the relative record. How can I access the current record? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Should be |
Beta Was this translation helpful? Give feedback.
-
Turns out I didn't need to access the iterated record. I am trying to re-use form and infolist code by storing it on the model and couldn't get the current record to initialize it, but turns out I didn't need to. Since the record is current I could just use |
Beta Was this translation helpful? Give feedback.
Turns out I didn't need to access the iterated record. I am trying to re-use form and infolist code by storing it on the model and couldn't get the current record to initialize it, but turns out I didn't need to. Since the record is current I could just use
->schema(Pet::getInfoList())
without having to use something like$record::getInfoList()
or$record->pet::getInfoList()
. I still think it would be helpful if we could access the current record withinRepeatableEntry
, I could only access the parent via->schema(fn ($record) => dd($record))
.