diff --git a/apps/app/components/issues/select/state.tsx b/apps/app/components/issues/select/state.tsx index 7dd024bb9..fcf2533e8 100644 --- a/apps/app/components/issues/select/state.tsx +++ b/apps/app/components/issues/select/state.tsx @@ -19,6 +19,7 @@ import { Combobox, Transition } from "@headlessui/react"; import { getStatesList } from "helpers/state.helper"; // fetch keys import { STATE_LIST } from "constants/fetch-keys"; +import { getStateGroupIcon } from "components/icons"; type Props = { setIsOpen: React.Dispatch>; @@ -46,12 +47,15 @@ export const IssueStateSelect: React.FC = ({ setIsOpen, value, onChange, value: state.id, display: state.name, color: state.color, + group: state.group, })); const filteredOptions = query === "" ? options : options?.filter((option) => option.display.toLowerCase().includes(query.toLowerCase())); + + const currentOption = options?.find((option) => option.value === value); return ( = ({ setIsOpen, value, onChange, > {value && value !== "" ? ( - option.value === value)?.color, - }} - /> - - {options?.find((option) => option.value === value)?.display} - + {currentOption && currentOption.group + ? getStateGroupIcon(currentOption.group, "16", "16", currentOption.color) + : ""} + {currentOption?.display} ) : ( - - {options?.find((option) => option.value === value)?.display || "State"} - + {currentOption?.display || "State"} )} @@ -130,12 +127,7 @@ export const IssueStateSelect: React.FC = ({ setIsOpen, value, onChange, states && (
- + {getStateGroupIcon(option.group, "16", "16", option.color)} {option.display}