react-query-questions
solid-query-questions
table-questions
virtual-questions
router-questions
react-charts-questions
ranger-questions
vue-query-questions
svelte-query-questions
bling-questions
form-questions
angular-query-questions
start-questions
db-questions
start-showcase
router-showcase
š£-announcements
Lack of Type Safety with Pre-bound Field Components?
useFieldContext
. However, this means that whenever I'm actually using the pre-bound field, there are no guardrails preventing me from using a pre-bound field with a form value of a different type.
Demonstrating in code, it seems like a big danger that I can do this:
```...What's the recommended way to handle hidden fields?
.superRefine
to require the text input value only if the checkbox is checked (its field as a value of true).
I noticed that depending on how I hide the text field, the meta (and the errors) may not be up-to-date.
Here some relevant code:...Hello everyone. I am looking for someone who can collaborate with me.
Type Errors with Zod Enum Usage
TypeScript issue if the (zod) schema is a union or is using superRefine?
Multiple reusable fields in one component
Typesafety in FormAPI and FieldAPI for Shadcn Form Components

Hi I'm using latest version of tanstack/form
Move to Next Field on Key Press
useRef
manually just to make it focus after each keypress (enter)?...onServerValidate example lacking other patterns.
Handling server errors coming from `useMutation`
Adding additional props to component wrap with withForm
withForm
HOC. Do I need to defined that additional props in with default value? props: {}
in withForm
hoc?
```tsx
import { withForm } from '@/shared/hooks';
//aditional props here...form.AppField -children-typeerror
<form.AppField
name="firstName"
children={(field) => <field.TextField label="First Name" />}
/>
<form.AppField
name="firstName"
children={(field) => <field.TextField label="First Name" />}
/>
Use field value with React Transitions
startTransition(() => field.setValue(...))
inside a form.Field
component, it does not seem it triggers what startTransition
does. I wanted to use this with React View Transition API, but calling field.setValue
inside startTransition
did not fire the transition animation. Replacing it with a simple useState
hook, it worked well.
Is this because TanStack form uses @tanstack/store
instead of a plain useState
? And if so, is there any way to circumvent this?...Validator schema as subset of default values
Server Validation With Next.js and form input
Pass props through context?
Complex object Select field, no reasonable defaultValue, and validation
Best practice typing a boolean field using zod (or other schema library)
isDogOwner: z.boolean()
Now, if I don't provide a default value in my defaultValues, typescript will complain that it's not matching the schema.
If I make it optional in zod, it will be optional in defaultValues.. but now my form validation is not right since I need the user to make a choice before submitting....Type hints when declaring formComponent / fieldComponent
fieldComponent
/ formComponent
so that it is aware of the form / field it is used from?
For example a Textfield
component that error out if the field it is used in is not of type string
Or an example I did recently: I wanted a generic ArrayField
that displays a consistent field for array fields in form. I did it like this (look into message below)
but it would be really nice to be able to not tie it to current form (in here FormData
) but make it generic, preserving type safety for name
prop...