Skip to content

The returning "fields" from "useFieldArray" is not the same even when it came fro mthe same lens #32

@phuc1640

Description

@phuc1640

I've tried the example from CodeSandbox here and I notice a strange behavior.

Image

If I just use the example as it is then the "Add Child" button work properly.

But if I move the "Add Child" button to the parent component but still keep the "useFieldArray" in the "ChildForm" to render the array, then it doesn't work. There is no new field being create when I click on "Add Child"

Here is the new code

Image

Is this a bug or is this something that is intended.

There is a feature that I'm working on the require me to have the parent component the append to the array and the child component to display it.
Right now I need to workarouond it by passing the "fileds" from the parent to the child with out using Lens.
Then my prop will be of this type which is not very nice

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions