I'm having a hard time implementing auto layouting in the context of subflows. From what I understand the demo app should be able to handle this, but I can't manage to make a working example.
{
"nodes": [
{
"id": "A",
"type": "base"
},
{
"id": "B",
"type": "base"
},
{
"id": "C",
"type": "base",
"parentNode": "A",
"extent": "parent"
},
{
"id": "D",
"type": "base",
"parentNode": "A",
"extent": "parent"
},
{
"id": "E",
"type": "base",
"parentNode": "A",
"extent": "parent"
},
{
"id": "F",
"type": "base"
}
],
"edges": [
{
"id": "A#B",
"source": "A",
"target": "B",
"sourceHandle": "A#source",
"targetHandle": "B#target"
},
{
"id": "B#F",
"source": "B",
"target": "F",
"sourceHandle": "B#source",
"targetHandle": "F#target"
},
{
"id": "C#D",
"source": "C",
"target": "D",
"sourceHandle": "C#source",
"targetHandle": "D#target"
},
{
"id": "D#E",
"source": "D",
"target": "E",
"sourceHandle": "D#source",
"targetHandle": "E#target"
}
]
}
This is what react flow renders. As you can see the 3 nodes that should be part of the subflow are not rendered inside the parent node:
I tried with all available layout algorithms and the results look similar. Not sure what I'm missing but I appreciate any help 🙏
P.S. I think this might be very useful as from what I see there are a lot of people having a hard time implementing this.
Hello,
I'm having a hard time implementing auto layouting in the context of subflows. From what I understand the demo app should be able to handle this, but I can't manage to make a working example.
This is my workflow structure (using
parentNodeas we are using reactflow@11):This is what react flow renders. As you can see the 3 nodes that should be part of the subflow are not rendered inside the parent node:
I tried with all available layout algorithms and the results look similar. Not sure what I'm missing but I appreciate any help 🙏
Thanks a lot!
P.S. I think this might be very useful as from what I see there are a lot of people having a hard time implementing this.