Enhance SolutionResource form functionality: add debounce to slug generation for improved user experience during input, and adjust layout in show.blade.php by reducing column width for better content presentation.

This commit is contained in:
2025-07-29 14:48:23 +05:00
parent dd167d9aaa
commit e97a80bfdb
2 changed files with 18 additions and 5 deletions

View File

@@ -27,7 +27,8 @@ class SolutionResource extends Resource
->required()
->maxLength(255)
->reactive()
->afterStateUpdated(fn (string $operation, $state, Forms\Set $set) => $operation === 'create' ? $set('slug', Str::slug($state)) : null),
->afterStateUpdated(fn (string $operation, $state, Forms\Set $set) => $operation === 'create' ? $set('slug', Str::slug($state)) : null)
->debounce('1000ms'),
Forms\Components\TextInput::make('slug')
->required()