fix: labels empty state for drop down (#6216)

This commit is contained in:
Vamsi Krishna 2024-12-17 19:14:10 +05:30 committed by GitHub
parent ede4aad55b
commit ddd4b51b4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 4 deletions

View file

@ -185,11 +185,18 @@ export const IssueLabelSelect: React.FC<IIssueLabelSelect> = observer((props) =>
) : canCreateLabel ? (
<p
onClick={() => {
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 <span className="text-custom-text-100">&quot;{query}&quot;</span> to labels
{query.length ? (
<>
+ Add <span className="text-custom-text-100">&quot;{query}&quot;</span> to labels
</>
) : (
"Type to add a new label"
)}
</p>
) : (
<p className="text-left text-custom-text-200 ">No matching results.</p>

View file

@ -341,11 +341,18 @@ export const IssuePropertyLabels: React.FC<IIssuePropertyLabels> = observer((pro
) : canCreateLabel ? (
<p
onClick={() => {
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 <span className="text-custom-text-100">&quot;{query}&quot;</span> to labels
{query.length ? (
<>
+ Add <span className="text-custom-text-100">&quot;{query}&quot;</span> to labels
</>
) : (
"Type to add a new label"
)}
</p>
) : (
<p className="text-left text-custom-text-200 ">No matching results.</p>