Skip to content

Commit

Permalink
fix: useDrag ts error definition
Browse files Browse the repository at this point in the history
  • Loading branch information
miracles1919 committed May 9, 2022
1 parent af5225a commit 7e461e3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/floating-bubble/floating-bubble.tsx
Expand Up @@ -85,6 +85,7 @@ export const FloatingBubble: FC<FloatingBubbleProps> = p => {
opacity: state.active ? 0.8 : 1,
})
},
// @ts-ignore
{
axis: props.axis === 'xy' ? undefined : props.axis,
pointer: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/floating-panel/floating-panel.tsx
Expand Up @@ -109,7 +109,7 @@ export const FloatingPanel = forwardRef<FloatingPanelRef, FloatingPanelProps>(
from: () => [0, y.get()],
pointer: { touch: true },
target: elementRef,
eventOptions: supportsPassive ? { passive: false } : false,
eventOptions: supportsPassive ? { passive: false } : undefined,
}
)

Expand Down
2 changes: 1 addition & 1 deletion src/components/picker-view/wheel.tsx
Expand Up @@ -135,7 +135,7 @@ export const Wheel = memo<Props>(
from: () => [0, y.get()],
preventDefault: true,
target: props.mouseWheel ? rootRef : undefined,
eventOptions: supportsPassive ? { passive: false } : false,
eventOptions: supportsPassive ? { passive: false } : undefined,
}
)

Expand Down
2 changes: 1 addition & 1 deletion src/components/pull-to-refresh/pull-to-refresh.tsx
Expand Up @@ -155,7 +155,7 @@ export const PullToRefresh: FC<PullToRefreshProps> = p => {
axis: 'y',
target: elementRef,
enabled: !props.disabled,
eventOptions: supportsPassive ? { passive: false } : false,
eventOptions: supportsPassive ? { passive: false } : undefined,
}
)

Expand Down

0 comments on commit 7e461e3

Please sign in to comment.