How to update defaultValues?
id of the selected entry as a prop, loads existing values with TSQuery, and uses them as defaultValues. Simple reproduction:
https://stackblitz.com/edit/vitejs-vite-ainjeqwv?file=src%2FApp.tsx
I change locale in the details component from default ("Ja") to different one ("En"), then switch to another entry in the list component.
The
locale value resets to default one, "Ja", (because of form.reset()), but somehow, the fields inside the <form.Subscribe> are now having values of the previous locale ("En").i.e. the locale field shows the correct, default locale (Ja), but values of the dependent fields are actually are from different locale - the locale that was previously selected in the previous entry (En).