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, where the form.Field that displays the array is conditionally rendered. In version 1.33.0, this does not seem to work anymore (it was broken from version 1.32.0). This bug is pretty similar to the issue I reported a couple of weeks ago, where the difference is that I now conditionally render the form.Field that displays the array. The use case for this, is showing a loading UI while the async data is fetched. It was concluded in my previous issue that it was a regression from #2172, so I assume the same goes for this new issue.
Your minimal, reproducible example
https://stackblitz.com/edit/tanstack-form-ehnyffpx?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 and the loading UI disappears
- You may click the "Add person"-button to notice that there suddenly is 2 people in the list
Expected behavior
I would expect the form.Field to render the array when the async data is resolved and the form.Field is displayed.
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.33.0 (from 1.32.0)
TypeScript version
6.0.3
Additional context
No response
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, where the
form.Fieldthat displays the array is conditionally rendered. In version 1.33.0, this does not seem to work anymore (it was broken from version 1.32.0). This bug is pretty similar to the issue I reported a couple of weeks ago, where the difference is that I now conditionally render theform.Fieldthat displays the array. The use case for this, is showing a loading UI while the async data is fetched. It was concluded in my previous issue that it was a regression from #2172, so I assume the same goes for this new issue.Your minimal, reproducible example
https://stackblitz.com/edit/tanstack-form-ehnyffpx?file=src%2Findex.tsx
Steps to reproduce
Expected behavior
I would expect the
form.Fieldto render the array when the async data is resolved and theform.Fieldis displayed.How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
TanStack Form adapter
react-form
TanStack Form version
1.33.0 (from 1.32.0)
TypeScript version
6.0.3
Additional context
No response