rekit / antd-form-builder

Dynamic meta driven React forms based on antd.

Home Page:https://rekit.github.io/antd-form-builder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nest for values as array

Abhikumar98 opened this issue · 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"
    ]
}