Closed atmonshi closed 10 months ago
filament/filament
v3.0.69
10.26.2
No response
v3.0.5
adding anonymous action to a repeater and using fillForm the shop_product_id will always return the first item in the repaeater.
fillForm
shop_product_id
Actions::make([ Actions\Action::make('more-options') ->label(function(Get $get){ return 'show btn '.$get('shop_product_id'); }) ->fillForm(function (Get $get): array { return [ 'shop_product_id' => $get('shop_product_id'), ]; }) ->form([ TextInput::make('shop_product_id') ]), ])
https://github.com/filamentphp/filament/assets/1952412/a167551f-eb47-44d5-a12a-7be6735d1160
each action mapped to the current item in the repater and sho it's values when using $get
$get
clone the repo https://github.com/atmonshi/demo
it's a fork from the demo app
access the page shop/orders/2/edit notice the Order items and click the action show btn 9 a modal will open with the value 21 which is the first item in the repeater.
shop/orders/2/edit
Order items
show btn 9
https://github.com/atmonshi/demo
no errors or exceptions thrown
I think this is a duplicate of #7454
Package
filament/filament
Package Version
v3.0.69
Laravel Version
10.26.2
Livewire Version
No response
PHP Version
v3.0.5
Problem description
adding anonymous action to a repeater and using
fillForm
theshop_product_id
will always return the first item in the repaeater.https://github.com/filamentphp/filament/assets/1952412/a167551f-eb47-44d5-a12a-7be6735d1160
Expected behavior
each action mapped to the current item in the repater and sho it's values when using
$get
Steps to reproduce
clone the repo https://github.com/atmonshi/demo
it's a fork from the demo app
access the page
shop/orders/2/edit
notice theOrder items
and click the actionshow btn 9
a modal will open with the value 21 which is the first item in the repeater.Reproduction repository
https://github.com/atmonshi/demo
Relevant log output