From 52b6e0ffbfb1e2889840292e7d826cba89aef9fb Mon Sep 17 00:00:00 2001 From: Kito Clark Date: Sat, 3 Aug 2024 08:18:05 +1000 Subject: [PATCH 1/2] fixed issues with ActionMenu and Popover rendered in modal --- lib/components/ActionsMenu/index.js | 13 +++++++++++-- lib/components/Modal/index.js | 7 ++++++- lib/components/Popover/index.js | 14 ++++++++++++-- lib/utils/floatingUiHelpers.js | 27 +++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 5 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 && ( -
+