Repeater not working on custom page

I have repeater inside the custom page

 $formComponents[] = Forms\Components\Repeater::make('request-' . $postOrderRequest->id)
                        ->schema([
                            Forms\Components\FileUpload::make('image')
                                ->label(__('request-builder.post_request.message'))
                                ->disk('s3')
                                ->image()
                                ->avatar()
                                ->required(),

                            Forms\Components\Textarea::make('response')
                                ->label(__('request-builder.post_request.message'))
                                ->rows(8)
                                ->required(),
                        ])
                        ->minItems(1)
                        ->columns(4)
                        ->maxItems(3);


 {{ $this->form }}
Solution
You should also add a statePath

public array $data = [];

...

return $form
  ->statePath('data')
  ->schema($formComponents);
Was this page helpful?