diff --git a/web/components/dropdowns/priority.tsx b/web/components/dropdowns/priority.tsx
index 1bf0bc933c1..382911b082f 100644
--- a/web/components/dropdowns/priority.tsx
+++ b/web/components/dropdowns/priority.tsx
@@ -1,7 +1,7 @@
import { Fragment, ReactNode, useRef, useState } from "react";
import { useTheme } from "next-themes";
import { usePopper } from "react-popper";
-import { Check, ChevronDown, Search } from "lucide-react";
+import { Check, ChevronDown, Search, SignalHigh } from "lucide-react";
import { Combobox } from "@headlessui/react";
// types
import { TIssuePriorities } from "@plane/types";
@@ -26,7 +26,7 @@ type Props = TDropdownProps & {
highlightUrgent?: boolean;
onChange: (val: TIssuePriorities) => void;
onClose?: () => void;
- value: TIssuePriorities;
+ value: TIssuePriorities | undefined;
};
type ButtonProps = {
@@ -37,7 +37,8 @@ type ButtonProps = {
hideText?: boolean;
isActive?: boolean;
highlightUrgent: boolean;
- priority: TIssuePriorities;
+ placeholder: string;
+ priority: TIssuePriorities | undefined;
showTooltip: boolean;
};
@@ -49,6 +50,7 @@ const BorderButton = (props: ButtonProps) => {
hideIcon = false,
hideText = false,
highlightUrgent,
+ placeholder,
priority,
showTooltip,
} = props;
@@ -75,7 +77,7 @@ const BorderButton = (props: ButtonProps) => {
{
className
)}
>
- {!hideIcon && (
-
- )}
- {!hideText &&
{priorityDetails?.title}}
+ >
+
+
+ ) : (
+
+ ))}
+ {!hideText && {priorityDetails?.title ?? placeholder}}
{dropdownArrow && (
)}
@@ -125,6 +130,7 @@ const BackgroundButton = (props: ButtonProps) => {
hideIcon = false,
hideText = false,
highlightUrgent,
+ placeholder,
priority,
showTooltip,
} = props;
@@ -151,7 +157,7 @@ const BackgroundButton = (props: ButtonProps) => {
{
className
)}
>
- {!hideIcon && (
-
- )}
- {!hideText &&
{priorityDetails?.title}}
+ >
+
+
+ ) : (
+
+ ))}
+ {!hideText && {priorityDetails?.title ?? placeholder}}
{dropdownArrow && (
)}
@@ -202,6 +211,7 @@ const TransparentButton = (props: ButtonProps) => {
hideText = false,
isActive = false,
highlightUrgent,
+ placeholder,
priority,
showTooltip,
} = props;
@@ -228,7 +238,7 @@ const TransparentButton = (props: ButtonProps) => {
{
className
)}
>
- {!hideIcon && (
-
- )}
- {!hideText &&
{priorityDetails?.title}}
+ >
+
+
+ ) : (
+
+ ))}
+ {!hideText && {priorityDetails?.title ?? placeholder}}
{dropdownArrow && (
)}
@@ -285,6 +298,7 @@ export const PriorityDropdown: React.FC = (props) => {
highlightUrgent = true,
onChange,
onClose,
+ placeholder = "Priority",
placement,
showTooltip = false,
tabIndex,
@@ -400,6 +414,7 @@ export const PriorityDropdown: React.FC = (props) => {
dropdownArrow={dropdownArrow && !disabled}
dropdownArrowClassName={dropdownArrowClassName}
hideIcon={hideIcon}
+ placeholder={placeholder}
showTooltip={showTooltip}
hideText={BUTTON_VARIANTS_WITHOUT_TEXT.includes(buttonVariant)}
/>