You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by sh...@apache.org on 2024/07/25 02:22:56 UTC
(incubator-answer) branch fix/1.3.6/pre-fill created (now 841ff381)
This is an automated email from the ASF dual-hosted git repository.
shuai pushed a change to branch fix/1.3.6/pre-fill
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
at 841ff381 fix: remove spaces in file.attributes.tags
This branch includes the following new commits:
new 841ff381 fix: remove spaces in file.attributes.tags
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(incubator-answer) 01/01: fix: remove spaces in file.attributes.tags
Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
shuai pushed a commit to branch fix/1.3.6/pre-fill
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
commit 841ff3810a962424671f26dc108002e2a5e3e9ec
Author: shuai <li...@sifou.com>
AuthorDate: Thu Jul 25 10:22:37 2024 +0800
fix: remove spaces in file.attributes.tags
---
ui/src/pages/Questions/Ask/index.tsx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ui/src/pages/Questions/Ask/index.tsx b/ui/src/pages/Questions/Ask/index.tsx
index fb2ed43e..fa936766 100644
--- a/ui/src/pages/Questions/Ask/index.tsx
+++ b/ui/src/pages/Questions/Ask/index.tsx
@@ -148,7 +148,12 @@ const Ask = () => {
formData.title.value = file.attributes?.title;
formData.content.value = file.body;
if (!queryTags && file.attributes?.tags) {
- updateTags(file.attributes.tags);
+ // Remove spaces in file.attributes.tags
+ const filterTags = file.attributes.tags
+ .split(',')
+ .map((tag) => tag.trim())
+ .join(',');
+ updateTags(filterTags);
}
} else if (draft) {
formData.title.value = draft.title;