© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
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
formatStateUsing
it works perfectly.

Do you know why this could be happening?
Screenshot_2023-09-24_at_11.26.31.png
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
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

formatStateUsing on simple repeater component
FilamentFFilament / ❓┊help
2y ago
formatStateUsing with condition
FilamentFFilament / ❓┊help
2y ago
Updating TextEntry using formatStateUsing
FilamentFFilament / ❓┊help
6mo ago
formatStateUsing not being called
FilamentFFilament / ❓┊help
16mo ago