From 490e1f696ac5a391f0a804acb7f12b96bded9cb1 Mon Sep 17 00:00:00 2001 From: swtmply Date: Wed, 26 Apr 2023 22:33:30 +0800 Subject: [PATCH] IO-1741 Added touched property on calculate button --- .../ca-bc-pvrt-calculator.component.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/components/ca-bc-pvrt-calculator/ca-bc-pvrt-calculator.component.jsx b/client/src/components/ca-bc-pvrt-calculator/ca-bc-pvrt-calculator.component.jsx index b1c1ebcc6..0a1476ee5 100644 --- a/client/src/components/ca-bc-pvrt-calculator/ca-bc-pvrt-calculator.component.jsx +++ b/client/src/components/ca-bc-pvrt-calculator/ca-bc-pvrt-calculator.component.jsx @@ -10,7 +10,10 @@ export default function CABCpvrtCalculator({ disabled, form }) { const handleFinish = async (values) => { logImEXEvent("job_ca_bc_pvrt_calculate"); - form.setFieldsValue({ ca_bc_pvrt: ((values.rate||0) * (values.days||0)).toFixed(2) }); + form.setFieldsValue({ + ca_bc_pvrt: ((values.rate || 0) * (values.days || 0)).toFixed(2), + }); + form.setFields([{ name: "ca_bc_pvrt", touched: true }]); setVisibility(false); };