This is an automated email from the ASF dual-hosted git repository.
shuai pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
The following commit(s) were added to refs/heads/dev by this push:
new 04e172d7 fix: formdata assignment order adjustment
04e172d7 is described below
commit 04e172d7526a7a9158d4503ea9fc5ac6c92f2541
Author: shuai <[email protected]>
AuthorDate: Fri Jul 12 17:48:14 2024 +0800
fix: formdata assignment order adjustment
---
ui/src/pages/Questions/Ask/index.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/src/pages/Questions/Ask/index.tsx
b/ui/src/pages/Questions/Ask/index.tsx
index 03af3152..25d5222d 100644
--- a/ui/src/pages/Questions/Ask/index.tsx
+++ b/ui/src/pages/Questions/Ask/index.tsx
@@ -147,6 +147,7 @@ const Ask = () => {
const file = fm<any>(decodeURIComponent(prefill));
formData.title.value = file.attributes?.title;
formData.content.value = file.body;
+ setFormData({ ...formData });
if (!queryTags && file.attributes?.tags) {
updateTags(file.attributes.tags);
}
@@ -157,9 +158,8 @@ const Ask = () => {
formData.answer_content.value = draft.answer_content;
setCheckState(Boolean(draft.answer_content));
setHasDraft(true);
+ setFormData({ ...formData });
}
-
- setFormData({ ...formData });
} else {
resetForm();
}