feat(node-modal): restore Parent Container selector for child types
Adds back the Parent Container selector in NodeModal, shown when: - child type is lxc or vm (parents: proxmox/vm/lxc/docker_host) - child type is docker_container (parents: docker_host/lxc/vm/proxmox) Selector hidden when no valid candidate node exists on the canvas. Centralizes the parent-type allowlist in getValidParentTypes (shared with the virtual-edge auto-parent helper). ha-relevant: yes
This commit is contained in:
@@ -550,6 +550,7 @@ export default function App() {
|
||||
onClose={() => setAddNodeOpen(false)}
|
||||
onSubmit={handleAddNode}
|
||||
title="Add Node"
|
||||
parentCandidates={nodes.map((n) => ({ id: n.id, label: n.data.label ?? n.id, type: n.data.type }))}
|
||||
/>
|
||||
|
||||
{/* key forces re-mount when editing a different node, resetting form state */}
|
||||
@@ -560,6 +561,8 @@ export default function App() {
|
||||
onSubmit={handleUpdateNode}
|
||||
initial={editNode?.data}
|
||||
title="Edit Node"
|
||||
parentCandidates={nodes.map((n) => ({ id: n.id, label: n.data.label ?? n.id, type: n.data.type }))}
|
||||
currentNodeId={editNodeId ?? undefined}
|
||||
/>
|
||||
|
||||
<EdgeModal
|
||||
|
||||
Reference in New Issue
Block a user