diff --git a/web/components/issues/issue-layouts/properties/estimates.tsx b/web/components/issues/issue-layouts/properties/estimates.tsx index e3f617958..087e153c5 100644 --- a/web/components/issues/issue-layouts/properties/estimates.tsx +++ b/web/components/issues/issue-layouts/properties/estimates.tsx @@ -3,6 +3,7 @@ import { usePopper } from "react-popper"; import { observer } from "mobx-react-lite"; import { Combobox } from "@headlessui/react"; import { Check, ChevronDown, Search, Triangle } from "lucide-react"; +import { sortBy } from "lodash"; // ui import { Tooltip } from "@plane/ui"; // types @@ -63,18 +64,18 @@ export const IssuePropertyEstimates: React.FC = observe const estimatePoints = projectDetails && isEstimateEnabled ? estimates?.find((e) => e.id === projectDetails.estimate)?.points : null; - const options: { value: number | null; query: string; content: any }[] | undefined = (estimatePoints ?? []).map( - (estimate) => ({ - value: estimate.key, - query: estimate.value, - content: ( -
- - {estimate.value} -
- ), - }) - ); + const options: { value: number | null; query: string; content: any }[] | undefined = ( + sortBy(estimatePoints, "key") ?? [] + ).map((estimate) => ({ + value: estimate.key, + query: estimate.value, + content: ( +
+ + {estimate.value} +
+ ), + })); options?.unshift({ value: null, query: "none",