fix(web): portal timeline overlays above stacked panels
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import { clsx } from "clsx";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { createPortal } from "react-dom";
|
||||
import { AllocationStatus } from "@capakraken/shared";
|
||||
import { trpc } from "~/lib/trpc/client.js";
|
||||
import { useInvalidateTimeline } from "~/hooks/useInvalidatePlanningViews.js";
|
||||
@@ -96,7 +97,7 @@ export function BatchAssignPopover({
|
||||
const canAssign =
|
||||
!!selectedProjectId && resourceIds.length > 0 && hoursPerDay > 0;
|
||||
|
||||
return (
|
||||
const popover = (
|
||||
<div
|
||||
ref={ref}
|
||||
className="fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-[60] w-[360px] bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl shadow-2xl dark:shadow-black/40 overflow-hidden"
|
||||
@@ -254,4 +255,6 @@ export function BatchAssignPopover({
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
return typeof document === "undefined" ? popover : createPortal(popover, document.body);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user