From c9fcce65906c10f85a41b7fb69760da521ee009a Mon Sep 17 00:00:00 2001 From: Harshit Singh <73997189+harshit078@users.noreply.github.com> Date: Thu, 31 Oct 2024 17:56:59 +0530 Subject: [PATCH] fix: Emails input field stays in errored state (#8243) ## Description - This PR fixes the issue #8235 - Error state resets when error state is removed ## Changes https://github.com/user-attachments/assets/0aeb99fe-56c8-437a-ad2c-97e245a44158 --- .../meta-types/input/components/MultiItemFieldInput.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiItemFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiItemFieldInput.tsx index 7aa56379f..0193e75da 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiItemFieldInput.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiItemFieldInput.tsx @@ -84,9 +84,9 @@ export const MultiItemFieldInput = ({ setInputValue(value); if (!validateInput) return; - if (errorData.isValid) { - setErrorData(errorData); - } + setErrorData( + errorData.isValid ? errorData : { isValid: true, errorMessage: '' }, + ); }; const handleAddButtonClick = () => {