dnbexperience/eufemia

bug(Iterate.Array): Iterate.Array does not work within a Form.Section with a path

andlbrei opened this issue ยท 1 comments

๐Ÿ› Bug Report

When Iterate.Array is within a Form.Section with a defined path, nothing happens when trying to add an item to to the array.

Screen.Recording.2024-09-24.at.22.57.50.mov

To Reproduce

Steps to reproduce the behavior:

https://codesandbox.io/p/sandbox/iterate-form-section-path-wp3cs7

Expected behavior

Expect object to be added to the array if the object is valid.

Eufemia Version

10.50.0

I tried this again with v10.53.0, and now the containers do not render.
New reprod:
https://codesandbox.io/p/sandbox/iterate-form-section-path-10-53-0-fvstp7

Also (let me know if I should create a separate issue) I found that when setting defaultValue on Iterate.Array if it has a parent Form.Section with a path, it uses the Form.Section path and the Iterate path like /{formSectionPath}/{iteratePath}/{index}, but not when inserting elements into the array; when editing or pushing it becomes /{formSectionPath}/{index}/{fieldPath}.
Reprod:
https://codesandbox.io/p/sandbox/iterate-path-issues-2r6fd5