From 9730b9ba2d715e27cfc9dee56394a5f2d02ff42e Mon Sep 17 00:00:00 2001 From: t0ng7u Date: Fri, 1 Aug 2025 03:00:12 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(ui):=20enhance=20tag=20input?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. EditModelModal quality-of-life • Added comma parsing to `Form.TagInput`; users can now paste `tag1, tag2 , tag3` to bulk-create tags. • Updated placeholder copy to reflect the new capability. All files pass linting; no runtime changes outside the intended UI updates. --- .../components/table/models/modals/EditModelModal.jsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/web/src/components/table/models/modals/EditModelModal.jsx b/web/src/components/table/models/modals/EditModelModal.jsx index 038a50d9..f1539d07 100644 --- a/web/src/components/table/models/modals/EditModelModal.jsx +++ b/web/src/components/table/models/modals/EditModelModal.jsx @@ -285,10 +285,19 @@ const EditModelModal = (props) => { { + if (!formApiRef.current) return; + const normalize = (tags) => { + if (!Array.isArray(tags)) return []; + return [...new Set(tags.flatMap(tag => tag.split(',').map(t => t.trim()).filter(Boolean)))]; + }; + const normalized = normalize(newTags); + formApiRef.current.setValue('tags', normalized); + }} />