Skip to content

Commit c0b5e0e

Browse files
fix: label creation (#6271)
1 parent fedcdf0 commit c0b5e0e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

web/core/components/issues/issue-detail/label/select/label-select.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,12 @@ export const IssueLabelSelect: React.FC<IIssueLabelSelect> = observer((props) =>
183183
) : submitting ? (
184184
<Loader className="spin h-3.5 w-3.5" />
185185
) : canCreateLabel ? (
186-
<p
187-
onClick={() => {
188-
if(!query.length) return
186+
<Combobox.Option
187+
value={query}
188+
onClick={(e) => {
189+
e.preventDefault();
190+
e.stopPropagation();
191+
if (!query.length) return;
189192
handleAddLabel(query);
190193
}}
191194
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) =>
197200
) : (
198201
"Type to add a new label"
199202
)}
200-
</p>
203+
</Combobox.Option>
201204
) : (
202205
<p className="text-left text-custom-text-200 ">No matching results.</p>
203206
)}

0 commit comments

Comments
 (0)