Forms\Components\TextInput::make('name')
->afterStateUpdated(function (\Closure $set, ?string $state) {
if (filled($state)) {
// Temporarily disable the key to prevent any input while it's being updated
$set('key', Str::slug($state));
}
})
->reactive(),
Forms\Components\TextInput::make('key')
Forms\Components\TextInput::make('name')
->afterStateUpdated(function (\Closure $set, ?string $state) {
if (filled($state)) {
// Temporarily disable the key to prevent any input while it's being updated
$set('key', Str::slug($state));
}
})
->reactive(),
Forms\Components\TextInput::make('key')