Anonymous Action doesn't work correctly inside repeater?

Repeater::make('items')
->schema([
TextInput::make('name'),
Actions::make([
Action::make('set_default')
->action(fn ($get) => dd($get('name'))
]),
]),
Repeater::make('items')
->schema([
TextInput::make('name'),
Actions::make([
Action::make('set_default')
->action(fn ($get) => dd($get('name'))
]),
]),
From the example above, the dd will always get the same state from the first row, no matter how many we have the row in the repeater. I can confirm that the state path of that action container are the same across repeater rows. So they also share the loading state, means when an action is loading, the others are loading too. But I have no idea to fix it.
5 Replies
IndomieRendang
IndomieRendangOP13mo ago
Is it considered as bug?
Lara Zeus
Lara Zeus13mo ago
not sure if its a bug I opened this https://github.com/filamentphp/filament/issues/9348 but it closed 🙂 and cant find a solution but to build a lw component with custom repeater
GitHub
repeater anonymous action not aware with current item state · Issue...
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 fillFor...
IndomieRendang
IndomieRendangOP13mo ago
hmmm... seems your issue is closed because it was the same/similar with another opened issue... Hopefully will be fixed soon
Abel Cobreros
Abel Cobreros13mo ago
Hi Lara, did you find any workaround? I am having the same issue adding a download button inside a repeater item but it always gets the data from the first one Nevermind, they just released a new version that fix the issue, lucky me! lol
Lara Zeus
Lara Zeus13mo ago
ya havent test it yet, but I am sure it fixed now
Want results from more Discord servers?
Add your server