Added Droppable hook and integrated ref
parent
a7a9593873
commit
43e0cea91b
|
|
@ -1,3 +1,4 @@
|
|||
import { useDroppable } from "@dnd-kit/core";
|
||||
import { useState } from "react";
|
||||
import ReactFlow, {
|
||||
Background,
|
||||
|
|
@ -14,10 +15,12 @@ const Flow = () => {
|
|||
setReactFlowInstance(rfi);
|
||||
};
|
||||
|
||||
const { isOver, setNodeRef } = useDroppable({ id: "flow" });
|
||||
|
||||
const { nodes, edges, onNodesChange, onEdgesChange, onConnect } = useStore();
|
||||
|
||||
return (
|
||||
<div className="flow h-screen w-full">
|
||||
<div ref={setNodeRef} className="flow h-screen w-full">
|
||||
<ReactFlow
|
||||
nodes={nodes}
|
||||
edges={edges}
|
||||
|
|
|
|||
Loading…
Reference in New Issue