mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: shortcut search (#283)
* fix: search case innsensitive * style: email icon updated
This commit is contained in:
parent
ab0ce2f649
commit
9b51a918cf
@ -45,9 +45,10 @@ const allShortcuts = shortcuts.map((i) => i.shortcuts).flat(1);
|
|||||||
|
|
||||||
export const ShortcutsModal: React.FC<Props> = ({ isOpen, setIsOpen }) => {
|
export const ShortcutsModal: React.FC<Props> = ({ isOpen, setIsOpen }) => {
|
||||||
const [query, setQuery] = useState("");
|
const [query, setQuery] = useState("");
|
||||||
|
|
||||||
const filteredShortcuts = allShortcuts.filter((shortcut) =>
|
const filteredShortcuts = allShortcuts.filter((shortcut) =>
|
||||||
shortcut.description.includes(query.trim()) || query === "" ? true : false
|
shortcut.description.toLowerCase().includes(query.trim().toLowerCase()) || query === ""
|
||||||
|
? true
|
||||||
|
: false
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -2,14 +2,13 @@ import { useState, useRef, FC } from "react";
|
|||||||
import { Transition } from "@headlessui/react";
|
import { Transition } from "@headlessui/react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
// icons
|
// icons
|
||||||
import { ArrowLongLeftIcon } from "@heroicons/react/24/outline";
|
import { ArrowLongLeftIcon, InboxIcon } from "@heroicons/react/24/outline";
|
||||||
import {
|
import {
|
||||||
QuestionMarkCircleIcon,
|
QuestionMarkCircleIcon,
|
||||||
BoltIcon,
|
BoltIcon,
|
||||||
DocumentIcon,
|
DocumentIcon,
|
||||||
DiscordIcon,
|
DiscordIcon,
|
||||||
GithubIcon,
|
GithubIcon,
|
||||||
CommentIcon,
|
|
||||||
} from "components/icons";
|
} from "components/icons";
|
||||||
// hooks
|
// hooks
|
||||||
import useTheme from "hooks/use-theme";
|
import useTheme from "hooks/use-theme";
|
||||||
@ -34,7 +33,7 @@ const helpOptions = [
|
|||||||
{
|
{
|
||||||
name: "Email us",
|
name: "Email us",
|
||||||
href: "mailto:hello@plane.so",
|
href: "mailto:hello@plane.so",
|
||||||
Icon: CommentIcon,
|
Icon: InboxIcon,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user