fix: remove old pointer-down function after radix-vue update
This commit is contained in:
parent
8dcc3564c3
commit
20b8433b7d
|
|
@ -24,7 +24,7 @@ interface DataTableFacetedFilter {
|
||||||
options: {
|
options: {
|
||||||
label: string
|
label: string
|
||||||
value: string
|
value: string
|
||||||
icon?: Component
|
icon: Component
|
||||||
}[]
|
}[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,20 +9,12 @@ import {
|
||||||
useEmitAsProps,
|
useEmitAsProps,
|
||||||
} from 'radix-vue'
|
} from 'radix-vue'
|
||||||
import { X } from 'lucide-vue-next'
|
import { X } from 'lucide-vue-next'
|
||||||
import type { PointerDownOutsideEvent } from 'radix-vue/dist/DismissableLayer'
|
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
const props = defineProps<DialogContentProps & { class?: string }>()
|
const props = defineProps<DialogContentProps & { class?: string }>()
|
||||||
const emits = defineEmits<DialogContentEmits>()
|
const emits = defineEmits<DialogContentEmits>()
|
||||||
|
|
||||||
const emitsAsProps = useEmitAsProps(emits)
|
const emitsAsProps = useEmitAsProps(emits)
|
||||||
|
|
||||||
function handlePointerDown(event: PointerDownOutsideEvent) {
|
|
||||||
const originalEvent = event.detail.originalEvent
|
|
||||||
// Ignore click events on the scrollbar.
|
|
||||||
if (originalEvent.offsetX > originalEvent.target?.clientWidth || originalEvent.offsetY > originalEvent.target?.clientHeight)
|
|
||||||
event.preventDefault()
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -38,7 +30,6 @@ function handlePointerDown(event: PointerDownOutsideEvent) {
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
v-bind="{ ...props, ...emitsAsProps }"
|
v-bind="{ ...props, ...emitsAsProps }"
|
||||||
@pointer-down-outside="handlePointerDown"
|
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user