© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
rajul

Does afterStateHydrated called twice?

I am trying to modify a text field before filling data like this :
Fieldset::make('UUID')
                ->relationship('uuid')
                ->schema([
                Forms\Components\TextInput::make('uuid')
                ->afterStateHydrated(function (Forms\Components\TextInput $component, $state) {
                    $prefix = "abc";
                    $component->state($prefix.$state);
                })
                ->label('UUID')
                ->required()
                ->maxLength(255),
                ]),
Fieldset::make('UUID')
                ->relationship('uuid')
                ->schema([
                Forms\Components\TextInput::make('uuid')
                ->afterStateHydrated(function (Forms\Components\TextInput $component, $state) {
                    $prefix = "abc";
                    $component->state($prefix.$state);
                })
                ->label('UUID')
                ->required()
                ->maxLength(255),
                ]),

But is appending "abc" twice before $state. it is like "abcabcUUID"
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

Action afterStateHydrated
FilamentFFilament / ❓┊help
2y ago
afterStateHydrated -undefined Method
FilamentFFilament / ❓┊help
3mo ago
Problem with afterStateHydrated
FilamentFFilament / ❓┊help
2y ago
__construct being called twice on custom page
FilamentFFilament / ❓┊help
3y ago