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
IndomieRendangβ€’8mo ago
Is it considered as bug?
Lara Zeus
Lara Zeusβ€’8mo 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
IndomieRendangβ€’8mo 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 Cobrerosβ€’8mo 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 Zeusβ€’8mo ago
ya havent test it yet, but I am sure it fixed now
Want results from more Discord servers?
Add your server
More Posts