Skip to content

Commit

Permalink
🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Mar 28, 2024
1 parent 858582b commit 7ab1ab0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/quiet-squids-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@udecode/plate-dnd": patch
---

Fix `handleRef` type
8 changes: 6 additions & 2 deletions packages/dnd/src/components/useDraggable.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import React from 'react';
import { TEditor, TElement } from '@udecode/plate-common';
import { ConnectDragSource, DropTargetMonitor } from 'react-dnd';
import { DropTargetMonitor } from 'react-dnd';

import { DragItemNode, DropLineDirection, useDndBlock } from '..';

import type { ReactElement, RefObject } from 'react';

export type DraggableState = {
dropLine: DropLineDirection;
isHovered: boolean;
setIsHovered: (isHovered: boolean) => void;
isDragging: boolean;
nodeRef: React.RefObject<HTMLDivElement>;
dragRef: ConnectDragSource;
dragRef: (
elementOrNode: RefObject<any> | ReactElement | Element | null
) => void;
};

export const useDraggableState = (props: {
Expand Down

0 comments on commit 7ab1ab0

Please sign in to comment.