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: {
|
||||
label: string
|
||||
value: string
|
||||
icon?: Component
|
||||
icon: Component
|
||||
}[]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,20 +9,12 @@ import {
|
|||
useEmitAsProps,
|
||||
} from 'radix-vue'
|
||||
import { X } from 'lucide-vue-next'
|
||||
import type { PointerDownOutsideEvent } from 'radix-vue/dist/DismissableLayer'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
const props = defineProps<DialogContentProps & { class?: string }>()
|
||||
const emits = defineEmits<DialogContentEmits>()
|
||||
|
||||
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>
|
||||
|
||||
<template>
|
||||
|
|
@ -38,7 +30,6 @@ function handlePointerDown(event: PointerDownOutsideEvent) {
|
|||
)
|
||||
"
|
||||
v-bind="{ ...props, ...emitsAsProps }"
|
||||
@pointer-down-outside="handlePointerDown"
|
||||
>
|
||||
<slot />
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user