Skip to content

Commit

Permalink
chore: use memoized lowercase tag search
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoung19 committed Oct 1, 2024
1 parent 952f4e1 commit e802629
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion popup/components/TagSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const TagSelect = ({ entryId }: Props) => {
const [tagSearch, setTagSearch] = useState("");
const tagSearchLowercase = useMemo(() => tagSearch.toLowerCase(), [tagSearch]);
const matchedTags = allTags.toSorted().filter((tag) => tag.includes(tagSearchLowercase));
const showCreateTagOption = tagSearch !== "" && !matchedTags.includes(tagSearch.toLowerCase());
const showCreateTagOption = tagSearch !== "" && !matchedTags.includes(tagSearchLowercase);

const [focusedTagIndex, setFocusedTagIndex] = useState(0);

Expand Down

0 comments on commit e802629

Please sign in to comment.