diff --git a/web/core/components/issues/issue-detail/label/select/label-select.tsx b/web/core/components/issues/issue-detail/label/select/label-select.tsx index 39c76180937..0c61feee8ca 100644 --- a/web/core/components/issues/issue-detail/label/select/label-select.tsx +++ b/web/core/components/issues/issue-detail/label/select/label-select.tsx @@ -185,11 +185,18 @@ export const IssueLabelSelect: React.FC = observer((props) => ) : canCreateLabel ? (

{ + if(!query.length) return handleAddLabel(query); }} - className="text-left text-custom-text-200 cursor-pointer" + className={`text-left text-custom-text-200 ${query.length ? "cursor-pointer" : "cursor-default"}`} > - + Add "{query}" to labels + {query.length ? ( + <> + + Add "{query}" to labels + + ) : ( + "Type to add a new label" + )}

) : (

No matching results.

diff --git a/web/core/components/issues/issue-layouts/properties/labels.tsx b/web/core/components/issues/issue-layouts/properties/labels.tsx index 56f9b651bef..697bf376b71 100644 --- a/web/core/components/issues/issue-layouts/properties/labels.tsx +++ b/web/core/components/issues/issue-layouts/properties/labels.tsx @@ -341,11 +341,18 @@ export const IssuePropertyLabels: React.FC = observer((pro ) : canCreateLabel ? (

{ + if (!query.length) return; handleAddLabel(query); }} - className="text-left text-custom-text-200 cursor-pointer" + className={`text-left text-custom-text-200 ${query.length ? "cursor-pointer" : "cursor-default"}`} > - + Add "{query}" to labels + {query.length ? ( + <> + + Add "{query}" to labels + + ) : ( + "Type to add a new label" + )}

) : (

No matching results.