F
Filament14mo ago
roni

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"
1 Reply
Dan Harrin
Dan Harrin14mo ago
please open an issue with a reproduction repository and we will investigate if this is deliberate or not