Skip to content

Commit

Permalink
Fix typing in setDrag
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Jun 3, 2024
1 parent ba01c12 commit 9f7d9a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/utils/setDrag.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Helper to configure datatransfer for drag & drop operations
*/
import { useEventStore } from "@/stores/eventStore";
import { type EventData, useEventStore } from "@/stores/eventStore";

export function setDrag(evt: DragEvent, data = null, multiple = false) {
export function setDrag(evt: DragEvent, data?: EventData, multiple = false) {
const eventStore = useEventStore();
if (data) {
evt.dataTransfer?.setData("text", JSON.stringify([data]));
Expand Down

0 comments on commit 9f7d9a4

Please sign in to comment.