From 4353f80774ea8064f0eb99b0974d843267dd181a Mon Sep 17 00:00:00 2001 From: Lionel Bueno Date: Thu, 9 Jan 2025 14:27:36 +0100 Subject: [PATCH] fix: set quantity to 1 if exceed ref: TAPC-2456 Signed-off-by: Lionel Bueno --- .../src/components/CreatePlanForm/CreatePlanForm.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/manager/apps/pci-savings-plan/src/components/CreatePlanForm/CreatePlanForm.tsx b/packages/manager/apps/pci-savings-plan/src/components/CreatePlanForm/CreatePlanForm.tsx index 9cadb57534ec..20b4a213637d 100644 --- a/packages/manager/apps/pci-savings-plan/src/components/CreatePlanForm/CreatePlanForm.tsx +++ b/packages/manager/apps/pci-savings-plan/src/components/CreatePlanForm/CreatePlanForm.tsx @@ -7,6 +7,7 @@ import { ODS_SPINNER_SIZE, OdsInputChangeEvent, } from '@ovhcloud/ods-components'; + import { OdsButton, OdsCard, @@ -317,7 +318,11 @@ const CreatePlanForm: FC = ({ { const newValue = Number(event.detail.value); - if (newValue >= 1 && newValue <= 1000) onChangeQuantity(newValue); + if (newValue >= 1 && newValue <= 1000) { + onChangeQuantity(newValue); + } else { + onChangeQuantity(1); + } }} value={quantity} min={1}