Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: label creation (#6271)

Vamsi Krishnac0b5e0e76628
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 0c61feee8c..20cb0b2599 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
@@ -183,9 +183,12 @@ export const IssueLabelSelect: React.FC<IIssueLabelSelect> = observer((props) =>
) : submitting ? (
<Loader className="spin h-3.5 w-3.5" />
) : canCreateLabel ? (
- <p
- onClick={() => {
- if(!query.length) return
+ <Combobox.Option
+ value={query}
+ onClick={(e) => {
+ e.preventDefault();
+ e.stopPropagation();
+ if (!query.length) return;
handleAddLabel(query);
}}
className={`text-left text-custom-text-200 ${query.length ? "cursor-pointer" : "cursor-default"}`}
@@ -197,7 +200,7 @@ export const IssueLabelSelect: React.FC<IIssueLabelSelect> = observer((props) =>
) : (
"Type to add a new label"
)}
- </p>
+ </Combobox.Option>
) : (
<p className="text-left text-custom-text-200 ">No matching results.</p>
)}