From 60d142202b9c854610f0a7335f3dce4677e4b003 Mon Sep 17 00:00:00 2001 From: Princi Vershwal Date: Wed, 6 Dec 2023 13:32:21 +0530 Subject: [PATCH] Remove validation error once user start typing (#19251) Ref [PROD-15](https://linear.app/tryghost/issue/PROD-15/validation-issues) --- .../components/settings/growth/offers/AddOfferModal.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/admin-x-settings/src/components/settings/growth/offers/AddOfferModal.tsx b/apps/admin-x-settings/src/components/settings/growth/offers/AddOfferModal.tsx index 202aa9b356..bcddb5df8a 100644 --- a/apps/admin-x-settings/src/components/settings/growth/offers/AddOfferModal.tsx +++ b/apps/admin-x-settings/src/components/settings/growth/offers/AddOfferModal.tsx @@ -129,6 +129,7 @@ const Sidebar: React.FC = ({tierOptions, handleAmountInput, handleCodeInput, validate, + clearError, errors, testId, handleTrialAmountInput, @@ -174,6 +175,7 @@ const Sidebar: React.FC = ({tierOptions, handleNameInput(e); setNameLength(e.target.value.length); }} + onKeyDown={() => clearError('name')} /> = ({tierOptions, onChange={(e) => { handleDisplayTitleInput(e); }} + onKeyDown={() => clearError('displayTitle')} />