Removed onBlur error feedback in Custom Integration edit modal (#19383)

Fixes
[PROD-268](https://linear.app/tryghost/issue/PROD-268/remove-onblur-error-feedback-in-custom-integration-edit-modal)
This commit is contained in:
Princi Vershwal 2023-12-14 18:00:07 +05:30 committed by GitHub
parent 255d1b1740
commit 82d9e3a978
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ const CustomIntegrationModalContent: React.FC<{integration: Integration}> = ({in
const {mutateAsync: uploadImage} = useUploadImage();
const handleError = useHandleError();
const {formState, updateForm, handleSave, saveState, errors, clearError, validate, okProps} = useForm({
const {formState, updateForm, handleSave, saveState, errors, clearError, okProps} = useForm({
initialState: integration,
savingDelay: 500,
savedDelay: 500,
@ -36,7 +36,7 @@ const CustomIntegrationModalContent: React.FC<{integration: Integration}> = ({in
const newErrors: Record<string, string> = {};
if (!formState.name) {
newErrors.name = 'Please enter a name';
newErrors.name = 'Name is required.';
}
return newErrors;
@ -126,7 +126,6 @@ const CustomIntegrationModalContent: React.FC<{integration: Integration}> = ({in
hint={errors.name}
title='Title'
value={formState.name}
onBlur={validate}
onChange={e => updateForm(state => ({...state, name: e.target.value}))}
onKeyDown={() => clearError('name')}
/>