fix: add dataset tags not update render (#2927)

This commit is contained in:
heheer
2024-10-15 17:44:50 +08:00
committed by GitHub
parent da281ea9ec
commit 00638d6ee7

View File

@@ -222,9 +222,10 @@ const TagManageModal = ({ onClose }: { onClose: () => void }) => {
onChange={(e) => setNewTag(e.target.value)}
ref={tagInputRef}
w={'200px'}
onBlur={() => {
onBlur={async () => {
if (newTag && !collectionTags.map((item) => item.tag).includes(newTag)) {
onCreateCollectionTag(newTag);
await onCreateCollectionTag(newTag);
fetchData(1);
}
setNewTag(undefined);
}}