[WEB-3712] improvement: create draft work item logic (#6847)
This commit is contained in:
parent
4be94adaca
commit
7bb291408d
5 changed files with 66 additions and 34 deletions
|
|
@ -1,18 +1,15 @@
|
|||
import React, { useRef, useState } from "react";
|
||||
import { usePopper } from "react-popper";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
import { Check, ChevronDown, Info, Search } from "lucide-react";
|
||||
import React, { useRef, useState } from "react";
|
||||
import { createPortal } from "react-dom";
|
||||
// plane helpers
|
||||
import { usePopper } from "react-popper";
|
||||
// plane imports
|
||||
import { useOutsideClickDetector } from "@plane/hooks";
|
||||
// hooks
|
||||
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
|
||||
// helpers
|
||||
// local imports
|
||||
import { cn } from "../../helpers";
|
||||
// types
|
||||
import { ICustomSearchSelectProps } from "./helper";
|
||||
// local components
|
||||
import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down";
|
||||
import { Tooltip } from "../tooltip";
|
||||
import { ICustomSearchSelectProps } from "./helper";
|
||||
|
||||
export const CustomSearchSelect = (props: ICustomSearchSelectProps) => {
|
||||
const {
|
||||
|
|
@ -36,6 +33,7 @@ export const CustomSearchSelect = (props: ICustomSearchSelectProps) => {
|
|||
optionsClassName = "",
|
||||
value,
|
||||
tabIndex,
|
||||
noResultsMessage = "No matches found",
|
||||
} = props;
|
||||
const [query, setQuery] = useState("");
|
||||
|
||||
|
|
@ -201,7 +199,7 @@ export const CustomSearchSelect = (props: ICustomSearchSelectProps) => {
|
|||
</Combobox.Option>
|
||||
))
|
||||
) : (
|
||||
<p className="text-custom-text-400 italic py-1 px-1.5">No matches found</p>
|
||||
<p className="text-custom-text-400 italic py-1 px-1.5">{noResultsMessage}</p>
|
||||
)
|
||||
) : (
|
||||
<p className="text-custom-text-400 italic py-1 px-1.5">Loading...</p>
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ interface CustomSearchSelectProps {
|
|||
footerOption?: JSX.Element;
|
||||
onChange: any;
|
||||
onClose?: () => void;
|
||||
noResultsMessage?: string;
|
||||
options:
|
||||
| {
|
||||
value: any;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue