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 :

{{ ($this->settings)(['item' => $id]) }}


in that action I have a form with repeater

->fillForm(function (array $arguments) {
    $client = $this->client();
    $getIndex = $client->getIndex($arguments['index']);
    $settings = $getIndex->getSettings();

    $filterableAttributes[$arguments['index'].'-filterableAttributes'] = $settings['filterableAttributes'];
    return $filterableAttributes;
})
->form(function (array $arguments) {
    return [
        Repeater::make('filterableAttributes')
            ->simple(TextInput::make('filterableAttributes'))
            ->grid(2)
            ->statePath($arguments['index'].'-filterableAttributes')
            ->key($arguments['index'].'-filterableAttsssributes')
    ];

})


it looks like any sup request will lose all the data in $arguments
Solution
NOW I CAN SLEEEEEEP 😂
Was this page helpful?