From 92912becab038d546fad76d2e3444b4c8979d128 Mon Sep 17 00:00:00 2001 From: anna Date: Thu, 12 Oct 2023 17:26:46 +0800 Subject: [PATCH] fix apply public notice bug --- .../PublicNotice/ApplyForm/PublicNoticeApplyForm.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js index c15fa3f..cc0f954 100644 --- a/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js +++ b/src/pages/PublicNotice/ApplyForm/PublicNoticeApplyForm.js @@ -24,6 +24,8 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => { const [isWarningPopUp, setIsWarningPopUp] = React.useState(false); const [warningText, setWarningText] = React.useState(""); const [attachment, setAttachment] = React.useState({}); + + const [issueId, setIssueId] = React.useState(loadedData.issueId); const navigate = useNavigate(); const BackgroundHead = { @@ -83,7 +85,7 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => { countryCode: values.fax_countryCode, faxNumber: values.faxNumber }, - issueId: values.issueId, + issueId: issueId, remarks: values.remarks ? values.remarks : "", }, files: [attachment], @@ -172,7 +174,10 @@ const PublicNoticeApplyForm = ({ loadedData, selections }) => { aria-labelledby="demo-radio-buttons-group-label" id="issueId" name="issueId" - defaultValue={formik.values.issueId} + defaultValue={issueId} + onChange={(event)=>{ + setIssueId(event.target.value); + }} > { selections