Skip to content

Commit

Permalink
Generate incident template slug on blur from name field (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrooksuk authored Jan 20, 2025
1 parent 4afdb25 commit 0bbb6a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Filament/Resources/IncidentTemplateResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static function form(Form $form): Form
Forms\Components\TextInput::make('name')
->label(__('cachet::incident_template.form.name_label'))
->required()
->live(debounce: 250)
->live(onBlur: true)
->afterStateUpdated(fn (Set $set, ?string $state) => $set('slug', Str::slug($state)))
->autocomplete(false),
Forms\Components\TextInput::make('slug')
Expand Down

0 comments on commit 0bbb6a9

Please sign in to comment.