Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Array objects Support #23

Open
wingkwong opened this issue Sep 12, 2020 · 3 comments
Open

Array objects Support #23

wingkwong opened this issue Sep 12, 2020 · 3 comments

Comments

@wingkwong
Copy link

Does react-hooks-helper support the following structure?

{
    "foo": [
        {
            "a": "",
            "b": "",
            "c": ""
        }, 
        {
            "a": "",
            "b": "",
            "c": ""
        }
    ]
}
@boulledogue
Copy link

Found a solution, use nested like this, (ie. "foo.3.a" or "foo.2.c") :

        <FormControl key={index}
                     placeholder="Acquis d'apprentissage"
                     name={"foo."+ index +".a"}
                     value={iteration.a}
                     onChange={setForm}
        />

@revelcw
Copy link
Owner

revelcw commented Feb 1, 2021

Does react-hooks-helper support the following structure?
...

What part of react-hooks-helper?

@RishwanthPerumandla
Copy link

How can we Add New Array fields through SetForm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants