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 Harrin2y ago
please open an issue with a reproduction repository and we will investigate if this is deliberate or not
Want results from more Discord servers?
Add your server