Skip to content

Commit 8cfbc84

Browse files
committed
performance tunning on custom fields
1 parent b3f89e8 commit 8cfbc84

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Fields/Configs/Concerns/HasInnerField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ protected static function getHasInnerFieldFieldsSchema(): array
115115
TextInput::make('label')
116116
->required()
117117
->helperText('Label for the field')
118-
->live()->afterStateUpdated(fn ($state, $set) => $state ? $set('name', Str::slug($state)) : null),
118+
->live(onBlur: true)->afterStateUpdated(fn ($state, $set) => $state ? $set('name', Str::slug($state)) : null),
119119

120120
TextInput::make('name')
121121
->required()

src/Filament/Resources/Helpers/FieldGroupResourceHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static function getNameFormComponent()
3434
->validationAttribute(__('inspirecms::resources/field-group.name.validation_attribute'))
3535
->required()
3636
->maxLength(255)
37-
->live(true, 500)
37+
->live(onBlur: true)
3838
->autofocus()
3939
->afterStateUpdated(function ($operation, Forms\Get $get, Forms\Set $set, $component, ?string $state) {
4040

0 commit comments

Comments
 (0)