From a0ae96d74a313081856c09f028319e543b2b93ea Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 15 Oct 2024 12:59:15 +0200 Subject: [PATCH] change: Removed flipAlignment prop for better alignment --- @navikt/core/react/src/overlays/floating-menu/Menu.tsx | 2 -- @navikt/core/react/src/overlays/floating/Floating.tsx | 3 --- 2 files changed, 5 deletions(-) diff --git a/@navikt/core/react/src/overlays/floating-menu/Menu.tsx b/@navikt/core/react/src/overlays/floating-menu/Menu.tsx index d181b627f7..cda316ee19 100644 --- a/@navikt/core/react/src/overlays/floating-menu/Menu.tsx +++ b/@navikt/core/react/src/overlays/floating-menu/Menu.tsx @@ -205,7 +205,6 @@ const MenuRootContentNonModal = React.forwardRef< ref={ref} disableOutsidePointerEvents={false} onDismiss={() => context.onOpenChange(false)} - flipAlignment={false} /> ); }); @@ -232,7 +231,6 @@ const MenuRootContentModal = forwardRef< { checkForDefaultPrevented: false }, )} onDismiss={() => context.onOpenChange(false)} - flipAlignment={false} /> ); }); diff --git a/@navikt/core/react/src/overlays/floating/Floating.tsx b/@navikt/core/react/src/overlays/floating/Floating.tsx index 54c0ed4d95..822801343b 100644 --- a/@navikt/core/react/src/overlays/floating/Floating.tsx +++ b/@navikt/core/react/src/overlays/floating/Floating.tsx @@ -187,7 +187,6 @@ interface FloatingContentProps extends HTMLAttributes { collisionBoundary?: Boundary | Boundary[]; collisionPadding?: number | Partial>; hideWhenDetached?: boolean; - flipAlignment?: boolean; updatePositionStrategy?: "optimized" | "always"; onPlaced?: () => void; arrow?: { @@ -213,7 +212,6 @@ const FloatingContent = forwardRef( updatePositionStrategy = "optimized", onPlaced, arrow: _arrow, - flipAlignment, ...contentProps }: FloatingContentProps, forwardedRef, @@ -258,7 +256,6 @@ const FloatingContent = forwardRef( altBoundary: hasExplicitBoundaries, /* https://floating-ui.com/docs/flip#fallbackaxissidedirection */ fallbackAxisSideDirection: "end", - flipAlignment, }; const { refs, floatingStyles, placement, isPositioned, middlewareData } =