diff --git a/plane-src/apps/web/core/components/issues/issue-detail/label/select/label-select.tsx b/plane-src/apps/web/core/components/issues/issue-detail/label/select/label-select.tsx index 575f44f..fc65572 100644 --- a/plane-src/apps/web/core/components/issues/issue-detail/label/select/label-select.tsx +++ b/plane-src/apps/web/core/components/issues/issue-detail/label/select/label-select.tsx @@ -127,97 +127,103 @@ export const IssueLabelSelect = observer(function IssueLabelSelect(props: IIssue onChange={(value) => onSelect(value)} multiple > - - - - - {typeof document !== "undefined" && - createPortal( - -
( + <> + + + + + {open && + typeof document !== "undefined" && + createPortal( + +
+
+
+ + setQuery(e.target.value)} + placeholder={t("common.search.label")} + displayValue={(assigned: any) => assigned?.name} + onKeyDown={searchInputKeyDown} + tabIndex={baseTabIndex} + /> +
+
+
+ {isLoading ? ( +

{t("common.loading")}

+ ) : filteredOptions.length > 0 ? ( + filteredOptions.map((option) => ( + + `nodedc-dropdown-option cursor-pointer ${ + selected ? "text-primary" : "text-secondary" + }` + } + > + {({ selected }) => ( + <> + {option.content} + {selected && ( +
+ +
+ )} + )} - - )} -
- )) - ) : submitting ? ( - - ) : canCreateLabel ? ( - { - e.preventDefault(); - e.stopPropagation(); - if (!query.length) return; - handleAddLabel(query); - }} - className={`rounded-[0.9rem] px-2 py-2 text-left text-secondary ${query.length ? "cursor-pointer hover:bg-white/6" : "cursor-default"}`} - > - {query.length ? ( - <> - + {t("label.create.type")} "{query}" - + + )) + ) : submitting ? ( + + ) : canCreateLabel ? ( + { + e.preventDefault(); + e.stopPropagation(); + if (!query.length) return; + handleAddLabel(query); + }} + className={`rounded-[0.9rem] px-2 py-2 text-left text-secondary ${query.length ? "cursor-pointer hover:bg-white/6" : "cursor-default"}`} + > + {query.length ? ( + <> + + {t("label.create.type")} "{query}" + + ) : ( + t("label.create.type") + )} + ) : ( - t("label.create.type") +

+ {t("common.search.no_matching_results")} +

)} - - ) : ( -

- {t("common.search.no_matching_results")} -

- )} -
-
-
, - document.body - )} +
+ +
, + document.body + )} + + )} );