Skip to content

submitOnChange causes issues when rendering arrays/objects #7

@bebraw

Description

@bebraw

I have arrays/objects in my schema. Looks like if submitOnChange is enabled, onSubmit doesn't take initial values in count. This means JSX rendering can fail in case it expects arrays/objects (initially undefined now).

You can see this problem at https://github.com/koodilehto/invoice-frontend/blob/3e1dd956fa7a1a5c57f906e78c1e21a4cb648f07/src/js/app.jsx .

I don't know what's the most natural way to deal with it. I could likely hack around it by doing some sort of copy at onSubmit to get the initial values right or hack at render but those don't feel right.

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