fix: issue relation mutation and draft issue (#2340)
* fix: issue relation mutation and draft issue * fix: 'New Issue' in gantt view fix: emoji select going under * fix: profile page typo
This commit is contained in:
parent
d9bd07886f
commit
cecdf890de
13 changed files with 268 additions and 184 deletions
|
|
@ -4,6 +4,7 @@ import { Tab, Transition, Popover } from "@headlessui/react";
|
|||
// react colors
|
||||
import { TwitterPicker } from "react-color";
|
||||
// hooks
|
||||
import useDynamicDropdownPosition from "hooks/use-dynamic-dropdown";
|
||||
import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
||||
// types
|
||||
import { Props } from "./types";
|
||||
|
|
@ -38,6 +39,7 @@ const EmojiIconPicker: React.FC<Props> = ({
|
|||
|
||||
const [recentEmojis, setRecentEmojis] = useState<string[]>([]);
|
||||
|
||||
const buttonRef = useRef<HTMLButtonElement>(null);
|
||||
const emojiPickerRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -49,10 +51,12 @@ const EmojiIconPicker: React.FC<Props> = ({
|
|||
}, [value, onChange]);
|
||||
|
||||
useOutsideClickDetector(emojiPickerRef, () => setIsOpen(false));
|
||||
useDynamicDropdownPosition(isOpen, () => setIsOpen(false), buttonRef, emojiPickerRef);
|
||||
|
||||
return (
|
||||
<Popover className="relative z-[1]">
|
||||
<Popover.Button
|
||||
ref={buttonRef}
|
||||
onClick={() => setIsOpen((prev) => !prev)}
|
||||
className="outline-none"
|
||||
disabled={disabled}
|
||||
|
|
@ -61,6 +65,8 @@ const EmojiIconPicker: React.FC<Props> = ({
|
|||
</Popover.Button>
|
||||
<Transition
|
||||
show={isOpen}
|
||||
static
|
||||
as={React.Fragment}
|
||||
enter="transition ease-out duration-100"
|
||||
enterFrom="transform opacity-0 scale-95"
|
||||
enterTo="transform opacity-100 scale-100"
|
||||
|
|
@ -68,11 +74,11 @@ const EmojiIconPicker: React.FC<Props> = ({
|
|||
leaveFrom="transform opacity-100 scale-100"
|
||||
leaveTo="transform opacity-0 scale-95"
|
||||
>
|
||||
<Popover.Panel className="absolute z-10 mt-2 w-[250px] rounded-[4px] border border-custom-border-200 bg-custom-background-80 shadow-lg">
|
||||
<div
|
||||
ref={emojiPickerRef}
|
||||
className="h-[230px] w-[250px] overflow-auto rounded-[4px] border border-custom-border-200 bg-custom-background-80 p-2 shadow-xl"
|
||||
>
|
||||
<Popover.Panel
|
||||
ref={emojiPickerRef}
|
||||
className="fixed z-10 mt-2 w-[250px] rounded-[4px] border border-custom-border-200 bg-custom-background-80 shadow-lg"
|
||||
>
|
||||
<div className="h-[230px] w-[250px] overflow-auto rounded-[4px] border border-custom-border-200 bg-custom-background-80 p-2 shadow-xl">
|
||||
<Tab.Group as="div" className="flex h-full w-full flex-col">
|
||||
<Tab.List className="flex-0 -mx-2 flex justify-around gap-1 p-1">
|
||||
{tabOptions.map((tab) => (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue