diff --git a/app/assets/javascripts/components/AutocompleteTagResult.tsx b/app/assets/javascripts/components/AutocompleteTagResult.tsx index d732541af..84bb150ac 100644 --- a/app/assets/javascripts/components/AutocompleteTagResult.tsx +++ b/app/assets/javascripts/components/AutocompleteTagResult.tsx @@ -21,9 +21,6 @@ export const AutocompleteTagResult = observer( const tagResultRef = useRef(null); - const title = tagResult.title; - const prefixTitle = appState.noteTags.getPrefixTitle(tagResult); - const onTagOptionClick = async (tag: SNTag) => { await appState.noteTags.addTagToActiveNote(tag); appState.noteTags.clearAutocompleteSearch(); @@ -89,10 +86,9 @@ export const AutocompleteTagResult = observer( > - {prefixTitle && {prefixTitle}} {autocompleteSearchQuery === '' - ? title - : title + ? tagResult.title + : tagResult.title .split(new RegExp(`(${autocompleteSearchQuery})`, 'gi')) .map((substring, index) => ( { - const noteTags = appState.noteTags; - - const { autocompleteInputFocused, focusedTagUuid, tags } = noteTags; + const { autocompleteInputFocused, focusedTagUuid, tags } = appState.noteTags; const [showDeleteButton, setShowDeleteButton] = useState(false); const [tagClicked, setTagClicked] = useState(false); @@ -20,10 +18,6 @@ export const NoteTag = observer(({ appState, tag }: Props) => { const tagRef = useRef(null); - const title = tag.title; - const prefixTitle = noteTags.getPrefixTitle(tag); - const longTitle = noteTags.getLongTitle(tag); - const deleteTag = () => { appState.noteTags.focusPreviousTag(tag); appState.noteTags.removeTagFromActiveNote(tag); @@ -103,12 +97,10 @@ export const NoteTag = observer(({ appState, tag }: Props) => { onFocus={onFocus} onBlur={onBlur} tabIndex={getTabIndex()} - title={longTitle} > - {prefixTitle && {prefixTitle}} - {title} + {tag.title} {showDeleteButton && (