File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ import { SUB_CLOSE_KEYS } from './utils'
24
24
import { Presence } from ' @/Presence'
25
25
import { useForwardExpose , useForwardPropsEmits } from ' @/shared'
26
26
27
- const props = defineProps <MenuSubContentProps >()
27
+ const props = withDefaults (defineProps <MenuSubContentProps >(), {
28
+ prioritizePosition: true ,
29
+ })
28
30
const emits = defineEmits <MenuSubContentEmits >()
29
31
30
32
const forwarded = useForwardPropsEmits (props , emits )
Original file line number Diff line number Diff line change @@ -212,6 +212,11 @@ const computedMiddleware = computedEager(() => {
212
212
mainAxis: props .sideOffset + arrowHeight .value ,
213
213
alignmentAxis: props .alignOffset ,
214
214
}),
215
+ props .prioritizePosition
216
+ && props .avoidCollisions
217
+ && flip ({
218
+ ... detectOverflowOptions .value ,
219
+ }),
215
220
props .avoidCollisions
216
221
&& shift ({
217
222
mainAxis: true ,
You can’t perform that action at this time.
0 commit comments