chore: remove placeholder from estimate property if no estimates are selected. (#4125)

This commit is contained in:
Prateek Shourya 2024-04-08 18:38:39 +05:30 committed by GitHub
parent 986f81e3ae
commit 39b5a58ce8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -48,7 +48,7 @@ export const EstimateDropdown: React.FC<Props> = observer((props) => {
hideIcon = false,
onChange,
onClose,
placeholder = "Estimate",
placeholder = "",
placement,
projectId,
showTooltip = false,
@ -197,7 +197,7 @@ export const EstimateDropdown: React.FC<Props> = observer((props) => {
variant={buttonVariant}
>
{!hideIcon && <Triangle className="h-3 w-3 flex-shrink-0" />}
{BUTTON_VARIANTS_WITH_TEXT.includes(buttonVariant) && (
{(selectedEstimate || placeholder) && BUTTON_VARIANTS_WITH_TEXT.includes(buttonVariant) && (
<span className="flex-grow truncate">{selectedEstimate !== null ? selectedEstimate : placeholder}</span>
)}
{dropdownArrow && (

View File

@ -21,6 +21,7 @@ export const SpreadsheetEstimateColumn: React.FC<Props> = observer((props: Props
onChange={(data) =>
onChange(issue, { estimate_point: data }, { changed_property: "estimate_point", change_details: data })
}
placeholder="Estimate"
projectId={issue.project_id}
disabled={disabled}
buttonVariant="transparent-with-text"