Skip to content

[v2] Unrendered fields are not marked as touched on submission #2299

Description

@LeCarbonator

Submitting a form does not mark fields as touched if they are not currently rendered. This affects virtualized forms, where only a subset of fields may be rendered at the time of submission.

Expected behavior

After the user attempts to submit the form, fields should be considered touched even if they were not rendered at the time.

Actual behavior

Fields that were not rendered when the form was submitted retain the default isTouched value of false.

Some thoughts

One possible fix is to keep submissionAttempts in a separate atom and have fields subscribe to it. When submissionAttempts > 0, the default value of isTouched should be true instead of false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: runtimeThis issue affects the runtime of the library.scope: coreThis issue affects the core package, meaning any adapter is also affected by it.type: bugThis is a bug in behaviour.v2This issue affects v2 as well.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions