Skip to content

Commit

Permalink
chore(ts): fix typechecking
Browse files Browse the repository at this point in the history
  • Loading branch information
mgcrea committed Nov 23, 2024
1 parent 1ccb74e commit f26d7ba
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/DndProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ export type DndProviderProps = {
) => void;
onUpdate?: (
event: GestureUpdateEvent<PanGestureHandlerEventPayload>,
meta: { activeId: UniqueIdentifier; activeLayout: LayoutRectangle; droppableActiveId: UniqueIdentifier },
meta: {
activeId: UniqueIdentifier;
activeLayout: LayoutRectangle;
droppableActiveId: UniqueIdentifier | null;
},
) => void;
onFinalize?: (
event: GestureStateChangeEvent<PanGestureHandlerEventPayload>,
Expand Down Expand Up @@ -310,7 +314,11 @@ export const DndProvider = forwardRef<DndProviderHandle, PropsWithChildren<DndPr
});
droppableActiveId.value = findDroppableLayoutId(draggableActiveLayout.value);
if (onUpdate) {
onUpdate(event, { activeId, activeLayout: draggableActiveLayout.value, droppableActiveId: droppableActiveId.value });
onUpdate(event, {
activeId,
activeLayout: draggableActiveLayout.value,
droppableActiveId: droppableActiveId.value,
});
}
})
.onFinalize((event) => {
Expand Down

0 comments on commit f26d7ba

Please sign in to comment.