File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
web/core/components/issues
issue-detail/label/select Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -185,11 +185,18 @@ export const IssueLabelSelect: React.FC<IIssueLabelSelect> = observer((props) =>
185185 ) : canCreateLabel ? (
186186 < p
187187 onClick = { ( ) => {
188+ if ( ! query . length ) return
188189 handleAddLabel ( query ) ;
189190 } }
190- className = " text-left text-custom-text-200 cursor-pointer"
191+ className = { ` text-left text-custom-text-200 ${ query . length ? " cursor-pointer" : "cursor-default" } ` }
191192 >
192- + Add < span className = "text-custom-text-100" > "{ query } "</ span > to labels
193+ { query . length ? (
194+ < >
195+ + Add < span className = "text-custom-text-100" > "{ query } "</ span > to labels
196+ </ >
197+ ) : (
198+ "Type to add a new label"
199+ ) }
193200 </ p >
194201 ) : (
195202 < p className = "text-left text-custom-text-200 " > No matching results.</ p >
Original file line number Diff line number Diff line change @@ -341,11 +341,18 @@ export const IssuePropertyLabels: React.FC<IIssuePropertyLabels> = observer((pro
341341 ) : canCreateLabel ? (
342342 < p
343343 onClick = { ( ) => {
344+ if ( ! query . length ) return ;
344345 handleAddLabel ( query ) ;
345346 } }
346- className = " text-left text-custom-text-200 cursor-pointer"
347+ className = { ` text-left text-custom-text-200 ${ query . length ? " cursor-pointer" : "cursor-default" } ` }
347348 >
348- + Add < span className = "text-custom-text-100" > "{ query } "</ span > to labels
349+ { query . length ? (
350+ < >
351+ + Add < span className = "text-custom-text-100" > "{ query } "</ span > to labels
352+ </ >
353+ ) : (
354+ "Type to add a new label"
355+ ) }
349356 </ p >
350357 ) : (
351358 < p className = "text-left text-custom-text-200 " > No matching results.</ p >
You can’t perform that action at this time.
0 commit comments