chore: add empty tips

pull/21555/head
CorrectRoadH 11 months ago
parent c42f9c2eae
commit d9b826b364

@ -42,7 +42,12 @@ const TagInput: FC<TagInputProps> = ({
const handleNewTag = useCallback((value: string) => { const handleNewTag = useCallback((value: string) => {
const valueTrimmed = value.trim() const valueTrimmed = value.trim()
if (!valueTrimmed || (items.find(item => item === valueTrimmed))) { if (!valueTrimmed) {
notify({ type: 'error', message: t('datasetDocuments.segment.keywordEmpty') })
return
}
if ((items.find(item => item === valueTrimmed))) {
notify({ type: 'error', message: t('datasetDocuments.segment.keywordDuplicate') }) notify({ type: 'error', message: t('datasetDocuments.segment.keywordDuplicate') })
return return
} }

Loading…
Cancel
Save