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 85bdec00 fix: aks page init formdata
85bdec00 is described below
commit 85bdec00095043c4926bdfc30ff7e28af6ba0e72
Author: shuai <[email protected]>
AuthorDate: Tue Jul 16 17:40:18 2024 +0800
fix: aks page init formdata
---
ui/src/pages/Questions/Ask/index.tsx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ui/src/pages/Questions/Ask/index.tsx
b/ui/src/pages/Questions/Ask/index.tsx
index 25d5222d..fb2ed43e 100644
--- a/ui/src/pages/Questions/Ask/index.tsx
+++ b/ui/src/pages/Questions/Ask/index.tsx
@@ -147,7 +147,6 @@ 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);
}
@@ -158,8 +157,8 @@ const Ask = () => {
formData.answer_content.value = draft.answer_content;
setCheckState(Boolean(draft.answer_content));
setHasDraft(true);
- setFormData({ ...formData });
}
+ setFormData({ ...formData });
} else {
resetForm();
}