Skip to content

Async initial array values are not set #2178

@eTallang

Description

@eTallang

Describe the bug

Until version 1.31.0, it's been possible to set async initial values that are in the form of an array. In version 1.32.0, this does not seem to work anymore. I assume this PR is the reason, however I've not looked into it.

Your minimal, reproducible example

https://stackblitz.com/edit/tanstack-form-skfjtgfa?file=src%2Findex.tsx

Steps to reproduce

  1. Open the StackBlitz
  2. Notice that no person is displayed after 3 seconds, when the async state is updated
  3. You may click the "Add person"-button to notice that there suddenly is 2 persons in the list

Expected behavior

When the async state is resolved, I would expect the state to be updated in the form as well. This works up until version 1.31.0.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome

TanStack Form adapter

react-form

TanStack Form version

1.32.0

TypeScript version

6.0.3

Additional context

No response

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