diff --git a/frontend/techpick/src/components/PickRecord/SharePickRecord.tsx b/frontend/techpick/src/components/PickRecord/SharePickRecord.tsx index c32c6d0af..ea19d6e16 100644 --- a/frontend/techpick/src/components/PickRecord/SharePickRecord.tsx +++ b/frontend/techpick/src/components/PickRecord/SharePickRecord.tsx @@ -124,7 +124,7 @@ export function SharePickRecord({ } interface SharePickRecordProps { - pickInfo: components['schemas']['baguni.api.service.sharedFolder.dto.SharedFolderResult$SharedPickInfo']; - tagList: components['schemas']['baguni.api.service.sharedFolder.dto.SharedFolderResult$SharedTagInfo'][]; + pickInfo: components['schemas']['baguni.domain.infrastructure.sharedFolder.dto.SharedFolderResult$SharedPickInfo']; + tagList: components['schemas']['baguni.domain.infrastructure.sharedFolder.dto.SharedFolderResult$SharedTagInfo'][]; folderAccessToken: string; } diff --git a/frontend/techpick/src/components/PickTagPicker/PickTagAutocompleteDialog.tsx b/frontend/techpick/src/components/PickTagPicker/PickTagAutocompleteDialog.tsx index 045b70f34..74917d56d 100644 --- a/frontend/techpick/src/components/PickTagPicker/PickTagAutocompleteDialog.tsx +++ b/frontend/techpick/src/components/PickTagPicker/PickTagAutocompleteDialog.tsx @@ -67,8 +67,17 @@ export function PickTagAutocompleteDialog({ }); }; + const checkIsCreatableTag = (value: string) => { + const isUnique = !tagList.some((tag) => tag.name === value.trim()); + const isNotInitialValue = value.trim() !== ''; + const isCreatable = isUnique && isNotInitialValue; + + setCanCreateTag(isCreatable); + }; + const clearTagInputValue = () => { setTagInputValue(''); + checkIsCreatableTag(''); }; const onSelectTag = (tag: TagType) => { @@ -123,14 +132,6 @@ export function PickTagAutocompleteDialog({ } }; - const checkIsCreatableTag = (value: string) => { - const isUnique = !tagList.some((tag) => tag.name === value.trim()); - const isNotInitialValue = value.trim() !== ''; - const isCreatable = isUnique && isNotInitialValue; - - setCanCreateTag(isCreatable); - }; - useEffect( function onOpenPickTagAutocompleteDialog() { if (open) {