chore(react): use correct type for nodeRef

This commit is contained in:
moklick
2024-01-24 15:45:49 +01:00
parent 033a4b4cc8
commit 8983d64397
+2 -2
View File
@@ -5,7 +5,7 @@ import { handleNodeClick } from '../components/Nodes/utils';
import { useStoreApi } from './useStore'; import { useStoreApi } from './useStore';
type UseDragParams = { type UseDragParams = {
nodeRef: RefObject<Element>; nodeRef: RefObject<HTMLDivElement>;
disabled?: boolean; disabled?: boolean;
noDragClassName?: string; noDragClassName?: string;
handleSelector?: string; handleSelector?: string;
@@ -39,7 +39,7 @@ export function useDrag({
handleNodeClick({ handleNodeClick({
id, id,
store, store,
nodeRef: nodeRef as RefObject<HTMLDivElement>, nodeRef,
}); });
}, },
onDragStart: () => { onDragStart: () => {