You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error:
No overload matches this call.
Overload 1 of 2, '(props: Partial | Readonly<Partial>): Draggable', gave the following error.
Type '(e: DraggableEventHandler, ui: WheelEvent) => void' is not assignable to type 'DraggableEventHandler'.
Types of parameters 'e' and 'e' are incompatible.
Type 'DraggableEvent' is not assignable to type 'DraggableEventHandler'.
Type 'MouseEvent' is not assignable to type 'DraggableEventHandler'.
Type 'MouseEvent' provides no match for the signature '(e: DraggableEvent, data: DraggableData): false | void'.
Overload 2 of 2, '(props: Partial, context: any): Draggable', gave the following error.
Type '(e: DraggableEventHandler, ui: WheelEvent) => void' is not assignable to type 'DraggableEventHandler'.ts(2769)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
What event type can I use for e and ui in your example?
const handleDrag = (e: DraggableEventHandler, ui: WheelEvent) => {
const {x, y} = deltaPosition;
setDeltaPosition(
{
x: x + ui.deltaX,
y: y + ui.deltaY
}
);
};
error:
No overload matches this call.
Overload 1 of 2, '(props: Partial | Readonly<Partial>): Draggable', gave the following error.
Type '(e: DraggableEventHandler, ui: WheelEvent) => void' is not assignable to type 'DraggableEventHandler'.
Types of parameters 'e' and 'e' are incompatible.
Type 'DraggableEvent' is not assignable to type 'DraggableEventHandler'.
Type 'MouseEvent' is not assignable to type 'DraggableEventHandler'.
Type 'MouseEvent' provides no match for the signature '(e: DraggableEvent, data: DraggableData): false | void'.
Overload 2 of 2, '(props: Partial, context: any): Draggable', gave the following error.
Type '(e: DraggableEventHandler, ui: WheelEvent) => void' is not assignable to type 'DraggableEventHandler'.ts(2769)
Beta Was this translation helpful? Give feedback.
All reactions