Skip to content

Commit cc4338d

Browse files
authored
Fix user password not saving on create or update (#49)
1 parent cf29bb3 commit cc4338d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/Filament/Resources/UserResource.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ public static function formSchema()
7171
->maxLength(255),
7272

7373
Forms\Components\TextInput::make('password')
74+
->required(fn (string $operation): bool => $operation === 'create')
7475
->password()
76+
->afterStateHydrated(function (Forms\Components\TextInput $component, $state) {
77+
$component->state('');
78+
})
79+
->dehydrated(fn (?string $state): bool => filled($state))
7580
->maxLength(255),
7681

7782
Forms\Components\DateTimePicker::make('email_verified_at'),

0 commit comments

Comments
 (0)