From 39b5a58ce8541501129d0e68aae255093be0f3d8 Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Mon, 8 Apr 2024 18:38:39 +0530 Subject: [PATCH] chore: remove placeholder from estimate property if no estimates are selected. (#4125) --- web/components/dropdowns/estimate.tsx | 4 ++-- .../issue-layouts/spreadsheet/columns/estimate-column.tsx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/components/dropdowns/estimate.tsx b/web/components/dropdowns/estimate.tsx index 1219a7011..45f7a9709 100644 --- a/web/components/dropdowns/estimate.tsx +++ b/web/components/dropdowns/estimate.tsx @@ -48,7 +48,7 @@ export const EstimateDropdown: React.FC = observer((props) => { hideIcon = false, onChange, onClose, - placeholder = "Estimate", + placeholder = "", placement, projectId, showTooltip = false, @@ -197,7 +197,7 @@ export const EstimateDropdown: React.FC = observer((props) => { variant={buttonVariant} > {!hideIcon && } - {BUTTON_VARIANTS_WITH_TEXT.includes(buttonVariant) && ( + {(selectedEstimate || placeholder) && BUTTON_VARIANTS_WITH_TEXT.includes(buttonVariant) && ( {selectedEstimate !== null ? selectedEstimate : placeholder} )} {dropdownArrow && ( diff --git a/web/components/issues/issue-layouts/spreadsheet/columns/estimate-column.tsx b/web/components/issues/issue-layouts/spreadsheet/columns/estimate-column.tsx index 298da4ff9..6acc0f6a5 100644 --- a/web/components/issues/issue-layouts/spreadsheet/columns/estimate-column.tsx +++ b/web/components/issues/issue-layouts/spreadsheet/columns/estimate-column.tsx @@ -21,6 +21,7 @@ export const SpreadsheetEstimateColumn: React.FC = 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"