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:
Pouzor
2026-03-08 11:48:02 +01:00
parent e306cd7b49
commit 8e711d9016
3 changed files with 25 additions and 5 deletions
+1
View File
@@ -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}