filament: TypeError Filament\Forms\Components\Repeater::Filament\Forms\Components{closure}(): Argument #1 ($state) must be of type array, null given

Package

filament/forms

Package Version

v2.7.4

Laravel Version

8.77.1

Livewire Version

2.8.2

PHP Version

8.0

Bug description

A resource with that has a form with a repeater inside a builder gives the following error on save: TypeError

Type Error
Filament\Forms\Components\Repeater::Filament\Forms\Components{closure}(): 
Argument #1 ($state) must be of type array, null given, called in
[...]/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php on line 36

Steps to reproduce

Create a resource with the following form as example:

return Builder::make('content')
    ->blocks([
        Builder\Block::make('pricing')
            ->schema([
                Placeholder::make('Pricing'),
                TextInput::make('title')->required(),
                Repeater::make('plans')->schema([
                    TextInput::make('title')->required()
                ])
            ]),
    ]);

On save you will see the error. The same repeater outside the builder block works fine.

Relevant log output

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Now it works 🎉 Thanks!