ФУНКЦИИ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: интерактивные карточки и фильтры двусторонней доски внешних контуров
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
import { Combobox } from "@headlessui/react";
|
||||
import { sortBy } from "lodash-es";
|
||||
import React, { useMemo, useRef, useState } from "react";
|
||||
import { createPortal } from "react-dom";
|
||||
import { usePopper } from "react-popper";
|
||||
// plane imports
|
||||
import { useOutsideClickDetector } from "@plane/hooks";
|
||||
@@ -138,36 +139,35 @@ export function Dropdown(props: ISingleSelectDropdown) {
|
||||
disabled={disabled}
|
||||
/>
|
||||
|
||||
{isOpen && (
|
||||
<Combobox.Options className="fixed z-10" static>
|
||||
<div
|
||||
className={cn(
|
||||
"my-1 w-48 rounded-sm border-[0.5px] border-strong bg-surface-1 px-2 py-2 text-11 shadow-raised-200 focus:outline-none",
|
||||
optionsContainerClassName
|
||||
)}
|
||||
ref={setPopperElement}
|
||||
style={styles.popper}
|
||||
{...attributes.popper}
|
||||
>
|
||||
<DropdownOptions
|
||||
isOpen={isOpen}
|
||||
query={query}
|
||||
setQuery={setQuery}
|
||||
inputIcon={inputIcon}
|
||||
inputPlaceholder={inputPlaceholder}
|
||||
inputClassName={inputClassName}
|
||||
inputContainerClassName={inputContainerClassName}
|
||||
disableSearch={disableSearch}
|
||||
keyExtractor={keyExtractor}
|
||||
options={sortedOptions}
|
||||
value={value}
|
||||
renderItem={renderItem}
|
||||
loader={loader}
|
||||
handleClose={handleClose}
|
||||
/>
|
||||
</div>
|
||||
</Combobox.Options>
|
||||
)}
|
||||
{isOpen &&
|
||||
createPortal(
|
||||
<Combobox.Options data-prevent-outside-click className="fixed z-30" static>
|
||||
<div
|
||||
className={cn("nodedc-dropdown-surface my-1 w-56", optionsContainerClassName)}
|
||||
ref={setPopperElement}
|
||||
style={styles.popper}
|
||||
{...attributes.popper}
|
||||
>
|
||||
<DropdownOptions
|
||||
isOpen={isOpen}
|
||||
query={query}
|
||||
setQuery={setQuery}
|
||||
inputIcon={inputIcon}
|
||||
inputPlaceholder={inputPlaceholder}
|
||||
inputClassName={inputClassName}
|
||||
inputContainerClassName={inputContainerClassName}
|
||||
disableSearch={disableSearch}
|
||||
keyExtractor={keyExtractor}
|
||||
options={sortedOptions}
|
||||
value={value}
|
||||
renderItem={renderItem}
|
||||
loader={loader}
|
||||
handleClose={handleClose}
|
||||
/>
|
||||
</div>
|
||||
</Combobox.Options>,
|
||||
document.body
|
||||
)}
|
||||
</Combobox>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user