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#
- Open the StackBlitz
- Notice that no person is displayed after 3 seconds, when the async state is updated
- 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
@eTallang, is there a specific reason for maintaining separate state here instead of directly using form.setFieldValue?