You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
useArrayItems' useEffect to initialize the forms was at fault. It would only run once on initialization, and any forms created in that run would essentially be static. Adding new items would create new, updated forms, but items were essentially one render behind.
Triggering the effect on every value update (the right thing) was blasting away all of the forms, causing inputs to be re-rendered and form input focus to be lost. Instead of creating all new items, the patch now iterates over the existing items, updating them if they exist and creating them if they don't.
When using the form generator hook with arrays, items are not updated if the form changes. This appears to be an issue with the useArrayItems hook.
The text was updated successfully, but these errors were encountered: