Using both afterStateUpdated AND afterStateUpdatedJs
Here, the php one doesn't work.
Or maybe it's immediately updated with the JS one?
TextInput::make('title')
->live(onBlur: true)
->afterStateUpdatedJs(SlugGenerator::slugifyWithJs(fieldName: 'slug'))
->afterStateUpdated(function (?string $state, Set $set, ?Model $record) {
$set('slug', SlugGenerator::unique($record, $state));
}),
TextInput::make('slug'),