F
Filament15mo ago
Noxo

Repeater - formatStateUsing

my code:
Forms\Components\Repeater::make('price_list')
->formatStateUsing(function (?array $state) {
return $state;
})
->schema([
Forms\Components\Hidden::make('name'),
Forms\Components\Checkbox::make('active'),
])
->columns(2)
Forms\Components\Repeater::make('price_list')
->formatStateUsing(function (?array $state) {
return $state;
})
->schema([
Forms\Components\Hidden::make('name'),
Forms\Components\Checkbox::make('active'),
])
->columns(2)
when I change the order the error appears - https://flareapp.io/share/4m4qnw4P but without formatStateUsing it works perfectly. Do you know why this could be happening?
Flare
Filament\Forms\ComponentContainer::getRawState(): Return value must be of type Illuminate\Contracts\Support\Arrayable|array, int returned - The error occurred at http://shever.noxo.test/admin/settings/price-list
No description
1 Reply
Patrick Boivin
Patrick Boivin15mo ago
Just out of curiosity - What are you trying to accomplish with formatStateUsing()?
Want results from more Discord servers?
Add your server