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";
|
||||
@@ -88,7 +89,7 @@ export function NewAllocationPopover({
|
||||
|
||||
const canCreate = !!selectedProjectId && !!start && !!end && hoursPerDay > 0;
|
||||
|
||||
return (
|
||||
const popover = (
|
||||
<div
|
||||
ref={ref}
|
||||
style={style}
|
||||
@@ -238,4 +239,6 @@ export function NewAllocationPopover({
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
return typeof document === "undefined" ? popover : createPortal(popover, document.body);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user