diff --git a/web/src/components/MemoEditor/ActionButton/TagSelector.tsx b/web/src/components/MemoEditor/ActionButton/TagSelector.tsx index e7409369..72e5a60b 100644 --- a/web/src/components/MemoEditor/ActionButton/TagSelector.tsx +++ b/web/src/components/MemoEditor/ActionButton/TagSelector.tsx @@ -1,5 +1,6 @@ import { IconButton } from "@mui/joy"; import Icon from "@/components/Icon"; +import OverflowTip from "@/components/kit/OverflowTip"; import { useTagStore } from "@/store/module"; interface Props { @@ -18,13 +19,13 @@ const TagSelector = (props: Props) => { {tags.length > 0 ? ( tags.map((tag) => { return ( - onTagSelectorClick(tag)} key={tag} > - #{tag} - + #{tag} + ); }) ) : ( diff --git a/web/src/components/MemoEditor/Editor/TagSuggestions.tsx b/web/src/components/MemoEditor/Editor/TagSuggestions.tsx index 6383926b..7ba64b14 100644 --- a/web/src/components/MemoEditor/Editor/TagSuggestions.tsx +++ b/web/src/components/MemoEditor/Editor/TagSuggestions.tsx @@ -1,6 +1,7 @@ import classNames from "classnames"; import { useEffect, useRef, useState } from "react"; import getCaretCoordinates from "textarea-caret"; +import OverflowTip from "@/components/kit/OverflowTip"; import { useTagStore } from "@/store/module"; import { EditorRefActions } from "."; @@ -8,6 +9,7 @@ type Props = { editorRef: React.RefObject; editorActions: React.ForwardedRef; }; + type Position = { left: number; top: number; height: number }; const TagSuggestions = ({ editorRef, editorActions }: Props) => { @@ -53,7 +55,6 @@ const TagSuggestions = ({ editorRef, editorActions }: Props) => { }; const matchedTags = tagsRef.current.filter((tag) => customMatches(tag, input)); - return matchedTags.slice(0, 5); })(); @@ -113,7 +114,7 @@ const TagSuggestions = ({ editorRef, editorActions }: Props) => { if (!isVisibleRef.current || !position) return null; return (
{suggestionsRef.current.map((tag, i) => ( @@ -125,7 +126,7 @@ const TagSuggestions = ({ editorRef, editorActions }: Props) => { i === selected ? "bg-zinc-300 dark:bg-zinc-700" : "" )} > - #{tag} + #{tag}
))}