fix: cluster edge type and label now persisted on connect
- canvasStore.onConnect was hardcoding type=ethernet and ignoring edgeData fields (type, label, color, etc.) - EdgeModal had no key, so useState was not reset between connections — initial prop ignored - Added key based on source/target/handles so modal re-mounts for each new connection
This commit is contained in:
@@ -261,6 +261,7 @@ export default function App() {
|
||||
/>
|
||||
|
||||
<EdgeModal
|
||||
key={pendingConnection ? `${pendingConnection.source}-${pendingConnection.sourceHandle}-${pendingConnection.target}-${pendingConnection.targetHandle}` : 'conn-idle'}
|
||||
open={!!pendingConnection}
|
||||
onClose={() => setPendingConnection(null)}
|
||||
onSubmit={handleEdgeConfirm}
|
||||
|
||||
Reference in New Issue
Block a user