From 441882b939bfc37e27133048b19e29d35aa058e8 Mon Sep 17 00:00:00 2001 From: anna Date: Thu, 7 Sep 2023 14:46:27 +0800 Subject: [PATCH] update combo --- .../authentication/auth-forms/CustomFormWizard.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/authentication/auth-forms/CustomFormWizard.js b/src/pages/authentication/auth-forms/CustomFormWizard.js index e66b921..75b9e00 100644 --- a/src/pages/authentication/auth-forms/CustomFormWizard.js +++ b/src/pages/authentication/auth-forms/CustomFormWizard.js @@ -79,6 +79,7 @@ const CustomFormWizard = (props) => { }; const [selectedIdDocType, setSelectedIdDocType] = useState({}); + const [selectedIdDocInputType, setSelectedIdDocInputType] = useState({}); // const [selectedIdDocLabel, setSelectedIdDocLabel] = useState(null); const [selectedAddress4, setSelectedAddress4] = useState(null); const [selectedAddress5, setSelectedAddress5] = useState(ComboData.country[0]); @@ -606,17 +607,20 @@ const CustomFormWizard = (props) => { idDocTypeComboList.label} onBlur={formik.handleBlur} + inputValue={selectedIdDocInputType} onChange={(event, newValue) => { - if (newValue!=null){ + if (newValue!=null && newValue != {}){ + setSelectedIdDocInputType(newValue.label); setSelectedIdDocType(newValue); if (newValue.type!="HKID"){ formik.setFieldValue("checkDigit","") } - + }else{ + setSelectedIdDocInputType(""); } }} sx={{"& .MuiInputBase-root": { height: "41px" },"#idDocType":{padding: "0px 0px 0px 0px"}, "& .MuiAutocomplete-endAdornment": { top: "auto" },}}