From 82d9e3a978936a9ff85bdd86b4b1d9def114b6f0 Mon Sep 17 00:00:00 2001 From: Princi Vershwal Date: Thu, 14 Dec 2023 18:00:07 +0530 Subject: [PATCH] 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) --- .../advanced/integrations/CustomIntegrationModal.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/admin-x-settings/src/components/settings/advanced/integrations/CustomIntegrationModal.tsx b/apps/admin-x-settings/src/components/settings/advanced/integrations/CustomIntegrationModal.tsx index 421692595e..7bdb5c88c5 100644 --- a/apps/admin-x-settings/src/components/settings/advanced/integrations/CustomIntegrationModal.tsx +++ b/apps/admin-x-settings/src/components/settings/advanced/integrations/CustomIntegrationModal.tsx @@ -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 = {}; 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')} />