is it possible to have a Repeater in action form in a loop
I should go to sleep but I wont till resolve this 😅
in a lw component with loops for items
and each item with an action :
in that action I have a form with repeater
it looks like any sup request will lose all the data in
$arguments
12 Replies
Not quite following, but you’re passing ‘item’ and checking against ‘index’ in the args array. Is that right?
Shouldn’t it also be $this->settingsAction
Need to see more code. The pieces aren’t fitting together in my head from what you provided.
ya I cleaned up some codes 🙂
changed a lot of things since I start writing the post
but yes the action is
{{ ($this->indexSettingsAction)(['index' => $index->getUid()]) }}
and worked fine and its available in
->fillForm(function (array $arguments)
and
->form(function (array $arguments)
but after any new ajax request (press add item in a repeater)
the $arguments
is null
let me test with text input to check...I think there’s a bug about this on GitHub too.
See if this works as a temp solution.
$arguments = Arr::first($livewire->mountedFormComponentActionsArguments);
will check now
nop it return null
Hmm. Not sure then. Had to do that in Tiptap editor, for the same reason.
I think it stems from the modal dispatching custom events on open and close which resets the arguments but haven’t been able to fully test.
will digg into it more
thanks adam
Go to bed. Dig tomorrow.
I should hehe
Solution
NOW I CAN SLEEEEEEP 😂
I get the arguments from
$arguments = Arr::last($livewire->mountedActionsArguments);
GitHub
arguments passed to action modal content missing · Issue #8763 · fi...
Package filament/filament Package Version 3.0.62 Laravel Version 10.25.1 Livewire Version 3.0.5 PHP Version 8.1.23 Problem description when passing action arguments to modal content view it become ...