Skip to content

Commit b1e4ad3

Browse files
feat(Select): add disableOutsidePointerEvents prop to Content (#2287)
1 parent 9758089 commit b1e4ad3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/core/src/Select/SelectContentImpl.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type {
33
ComponentPublicInstance,
44
Ref,
55
} from 'vue'
6-
import type { PointerDownOutsideEvent } from '@/DismissableLayer'
6+
import type { DismissableLayerProps, PointerDownOutsideEvent } from '@/DismissableLayer'
77
import type { PopperContentProps } from '@/Popper'
88
import type { AcceptableValue } from '@/shared/types'
99
import { useCollection } from '@/Collection'
@@ -60,7 +60,7 @@ export type SelectContentImplEmits = {
6060
pointerDownOutside: [event: PointerDownOutsideEvent]
6161
}
6262
63-
export interface SelectContentImplProps extends PopperContentProps {
63+
export interface SelectContentImplProps extends PopperContentProps, DismissableLayerProps {
6464
/**
6565
* The positioning mode to use
6666
*
@@ -99,6 +99,7 @@ const props = withDefaults(defineProps<SelectContentImplProps>(), {
9999
align: 'start',
100100
position: 'item-aligned',
101101
bodyLock: true,
102+
disableOutsidePointerEvents: true,
102103
})
103104
const emits = defineEmits<SelectContentImplEmits>()
104105
@@ -285,7 +286,7 @@ provideSelectContentContext({
285286
>
286287
<DismissableLayer
287288
as-child
288-
disable-outside-pointer-events
289+
:disable-outside-pointer-events="disableOutsidePointerEvents"
289290
@focus-outside.prevent
290291
@dismiss="rootContext.onOpenChange(false)"
291292
@escape-key-down="emits('escapeKeyDown', $event)"

0 commit comments

Comments
 (0)