From f4c56055558743811d7bf33da5a0ae362b974ca0 Mon Sep 17 00:00:00 2001 From: KitoC <35714838+KitoC@users.noreply.github.com> Date: Mon, 5 Aug 2024 10:05:39 +1000 Subject: [PATCH] TPP 849 fix modal and popover z index issues (#311) --- lib/components/ActionsMenu/index.js | 13 +++++++++++-- lib/components/Modal/index.js | 7 ++++++- lib/components/Popover/index.js | 14 ++++++++++++-- lib/utils/floatingUiHelpers.js | 27 +++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 59 insertions(+), 8 deletions(-) create mode 100644 lib/utils/floatingUiHelpers.js diff --git a/lib/components/ActionsMenu/index.js b/lib/components/ActionsMenu/index.js index 82591534..a71ebb0b 100644 --- a/lib/components/ActionsMenu/index.js +++ b/lib/components/ActionsMenu/index.js @@ -18,6 +18,10 @@ import { FloatingPortal, useMergeRefs } from "@floating-ui/react"; +import { + getFloatingUiRootElement, + getFloatingUiZIndex +} from "../../utils/floatingUiHelpers"; const ActionMenuContext = createContext({}); @@ -314,14 +318,19 @@ export const ActionsMenuBody = ({ {triggerComponent} {actionMenu.context.open && ( - +
{visible && ( -
+