Does afterStateHydrated called twice?
I am trying to modify a text field before filling data like this :
But is appending "abc" twice before $state. it is like "abcabcUUID"
But is appending "abc" twice before $state. it is like "abcabcUUID"
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),
]),