Describe the bug#
This is essentially the same issue as https://github.com/TanStack/store/issues/218, but specific to useForm's form options updates. If default values were changed and the changed value is an object that does not return property keys via Object.keys—such as Date, File, or Temporal.Duration/Temporal.PlainDate—then evaluate returns true and shouldUpdateValues returns false. This causes the form API to not be updated, so nothing rerenders despite a prop change.
Your minimal, reproducible example#
https://codesandbox.io/p/devbox/modest-jang-4635xz
Steps to reproduce#
- Create a field that uses one of these types of objects as a value. e.g. Temporal.Duration, or Date.
- Give it a default value
- Update the default value (without touching the input)
Expected behavior#
The field should update its untouched default value accordingly to the updated default value.
How often does this bug happen?#
Every time
Screenshots or Videos#
No response
Platform#
- OS: macOS
- Browser: Arc (Chromium)
- Version: 138.0
TanStack Form adapter#
react-form
TanStack Form version#
v1.12.3
TypeScript version#
v5.8.2
Additional context#
No response
Might want to reference for this update to
shallowforevaluate.https://github.com/TanStack/store/pull/222