Describe the bug
When an OrganizationChart node has more than MAX_CHILDREN_PER_ROW (10) children, child nodes are rendered multiple times. createChildrenSection() correctly chunks children into rows, but createLinesDown(), createLinesMiddle(), and createChildNodes() each re-chunk all children and render every row on each iteration instead of only the current row slice. For example, 16 children produce two chunks and the full subtree is duplicated (each child appears twice).
Reproducer
https://stackblitz.com/edit/vitejs-vite-pekean1c
System Information
System:
OS: Windows 11 10.0.26200
CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz
Memory: 1.79 GB / 15.71 GB
Binaries:
Node: 22.18.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.22 - C:\Users\LENOVO\AppData\Roaming\npm\yarn.CMD
npm: 11.5.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 148.0.7778.179
Edge: Chromium (140.0.3485.54)
Internet Explorer: 11.0.26100.8115
Steps to reproduce the behavior
Steps to reproduce
- Render OrganizationChart with data where one node has 11 or more children.
- Ensure that node is expanded.
- Inspect the chart or DOM.
Expected behavior
Expected behavior
Each child appears exactly once, split across rows of at most 10 children per row.
Actual behavior
Children are duplicated once per chunk (e.g. 11–20 children → 2× duplication).
Describe the bug
When an OrganizationChart node has more than MAX_CHILDREN_PER_ROW (10) children, child nodes are rendered multiple times. createChildrenSection() correctly chunks children into rows, but createLinesDown(), createLinesMiddle(), and createChildNodes() each re-chunk all children and render every row on each iteration instead of only the current row slice. For example, 16 children produce two chunks and the full subtree is duplicated (each child appears twice).
Reproducer
https://stackblitz.com/edit/vitejs-vite-pekean1c
System Information
System: OS: Windows 11 10.0.26200 CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz Memory: 1.79 GB / 15.71 GB Binaries: Node: 22.18.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.22 - C:\Users\LENOVO\AppData\Roaming\npm\yarn.CMD npm: 11.5.2 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: 148.0.7778.179 Edge: Chromium (140.0.3485.54) Internet Explorer: 11.0.26100.8115Steps to reproduce the behavior
Steps to reproduce
Expected behavior
Expected behavior
Each child appears exactly once, split across rows of at most 10 children per row.
Actual behavior
Children are duplicated once per chunk (e.g. 11–20 children → 2× duplication).