// react import React from "react"; // react-hook-form import { Control, Controller, UseFormWatch } from "react-hook-form"; // headless ui import { Listbox, Transition } from "@headlessui/react"; // icons import { ChevronDownIcon, ChartBarIcon } from "@heroicons/react/24/outline"; // types import { IIssue } from "types"; // constants import { classNames } from "constants/common"; import { PRIORITIES } from "constants/"; import CustomSelect from "ui/custom-select"; type Props = { control: Control; submitChanges: (formData: Partial) => void; watch: UseFormWatch; }; const SelectPriority: React.FC = ({ control, submitChanges, watch }) => { return (

Priority

( {watch("priority") && watch("priority") !== "" ? watch("priority") : "None"} } value={value} onChange={(value: any) => { submitChanges({ priority: value }); }} > {PRIORITIES.map((option) => ( {option} ))} )} />
); }; export default SelectPriority;