From 30d7a567b1412fde4475efb9ae0c8d4e778c0ecc Mon Sep 17 00:00:00 2001 From: Matt Gilbert Date: Mon, 23 Feb 2026 15:38:46 -0500 Subject: [PATCH] feat(VOverlay): noFlip location strategy prop --- .../src/locale/en/VOverlay-location-strategies.json | 3 ++- .../vuetify/src/components/VOverlay/locationStrategies.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/api-generator/src/locale/en/VOverlay-location-strategies.json b/packages/api-generator/src/locale/en/VOverlay-location-strategies.json index b60a41bc348..02917ebe688 100644 --- a/packages/api-generator/src/locale/en/VOverlay-location-strategies.json +++ b/packages/api-generator/src/locale/en/VOverlay-location-strategies.json @@ -3,6 +3,7 @@ "locationStrategy": "A function used to specifies how the component should position relative to its activator.", "offset": "Increases distance from the target. When passed as a pair of numbers, the second value shifts anchor along the side and away from the target.", "stickToTarget": "Enables the overlay content to go off-screen when scrolling.", - "viewportMargin": "Sets custom viewport margin for the overlay content" + "viewportMargin": "Sets custom viewport margin for the overlay content", + "noFlip": "When using the \"connected\" location strategy, adjust the position when needed by shifting only, not flipping." } } diff --git a/packages/vuetify/src/components/VOverlay/locationStrategies.ts b/packages/vuetify/src/components/VOverlay/locationStrategies.ts index c6591558dab..fadb72e2871 100644 --- a/packages/vuetify/src/components/VOverlay/locationStrategies.ts +++ b/packages/vuetify/src/components/VOverlay/locationStrategies.ts @@ -58,6 +58,7 @@ export interface StrategyProps { maxWidth?: number | string minHeight?: number | string minWidth?: number | string + noFlip?: boolean } export const makeLocationStrategyProps = propsFactory({ @@ -80,6 +81,7 @@ export const makeLocationStrategyProps = propsFactory({ type: [Number, String], default: 12, }, + noFlip: Boolean, }, 'VOverlay-location-strategies') export function useLocationStrategies ( @@ -430,7 +432,7 @@ function connectedLocationStrategy (data: LocationStrategyData, props: StrategyP contentBox.y += _y // flip - { + if (!props.noFlip) { const axis = getAxis(placement.anchor) const hasOverflowX = overflows.x.before || overflows.x.after const hasOverflowY = overflows.y.before || overflows.y.after