Repeater: TextInput action always returning last record in Model $record
I have an action in a repeater that need access to the current repeater entry:
In my form I also add the following to put very basic test data in into the form:
Trying
$get('id') returns the value of the last row 2 when it should be 1.
Similar thing happens when I try to use ->relationship and get the current Model $record.
Any ideas?
Solution:Jump to solution
```php
->hintAction(fn (Get $get): Action => Action::make('display_value')
->schema([
TextInput::make('new_amount'),
])...
3 Replies
Solution
Thanks that was it 👍
and inject
array $data to get the new_amount ☝️