T
TanStack4w ago
adverse-sapphire

Fields in the error state re-render when changing other fields?

Hey hey See here: https://codesandbox.io/p/devbox/frosty-shamir-23c7px?file=%2Fsrc%2Findex.tsx If you leave First Name blank and start typing in last name, it re-renders first name on every character, but if you put something in first name so its valid then type last name, it does not? Am I being dense or should this not re-render in this case?
1 Reply
extended-salmon
extended-salmon4w ago
zod schemas in errors are currently not deeply compared, https://github.com/TanStack/form/issues/1625
GitHub
Using zod schema as a form level onChange validator causes form ele...
Describe the bug Let's consider the example from the documentation which uses a zod schema as its form-level onChange validator: https://tanstack.com/form/latest/docs/framework/react/examples/s...

Did you find this page helpful?