Skip to content

Commit 4db3302

Browse files
committed
fix: 태그 생성 시 마지막 글자 남아있는 오류 해결
1 parent 5c2e8be commit 4db3302

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

frontend/src/components/node-datail/fields/TagField.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,26 +131,20 @@ export function TagField({ projectId, nodeId, initialTags }: TagFieldProps) {
131131
return;
132132
}
133133

134-
resetInput();
135134
createTag(
136135
{ name: trimmed, color: randomColor() },
137136
{
138137
onSuccess: (newTag) => {
139138
if (!newTag?.tagId) return;
140-
yAddTag(newTag);
141-
addTag(newTag.tagId, {
142-
onError: (err) => {
143-
yRemoveTag(newTag.tagId!);
144-
showErrorToast(err, '태그 추가에 실패했어요.');
145-
},
146-
});
139+
handleAdd(newTag);
147140
},
148141
onError: (err) => showErrorToast(err, '태그 생성에 실패했어요.'),
149142
},
150143
);
151144
};
152145

153146
const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
147+
if (e.nativeEvent.isComposing) return;
154148
if (e.key === 'ArrowDown') {
155149
e.preventDefault();
156150
setSelectedIndex((prev) => Math.min(prev + 1, totalItems - 1));

0 commit comments

Comments
 (0)