antd-form-builder icon indicating copy to clipboard operation
antd-form-builder copied to clipboard

Nest for values as array

Open Abhikumar98 opened this issue 3 years ago • 0 comments

Unable to use nested array values.
https://codesandbox.io/s/autumn-butterfly-8tubs?file=/src/DynamicFields.js

Example. If we are trying to nest as objs if we take A.B and A.C as 2 keys in the form with both being inputs, and have submit the form then we get the result as

A: {
    B: 'value B',
    C: 'value C`
}

But unable to do the same for array,

A[0].B and A[1].C are the keys and while submitting.

{
    A[0]: {
        B: "value B"
    },
    A[1]: {
        C: 'value C',
    }
}

Instead of being this way

{
    A: [
        B: "value B",
        C: "value C"
    ]
}

Abhikumar98 avatar Mar 27 '21 12:03 Abhikumar98