TanStackT
TanStackโ€ข13mo agoโ€ข
8 replies
precious-lavender

Question about field.state.value typing with Vue

Hi, I'm new to this library and fairly new to TS, so please excuse the probably silly question. However, I've followed the async initial values example for Vue from the docs, and I'm finding that the TS linter is complaining because the possible types of the field.state.value across all fields is shown as all the types contained in the type I passed to useForm. However, for each field the types are limited by the model-value prop for the respective input/control type. I managed to fix this yesterday, I think by passing <Partial<myFormType>> to useForm, but this isn't working now I've added some more fields. I don't know how I've broken it and hope it's an easy fix ๐Ÿ™‚ Thanks in advance for any help, and thanks for the library.
image.png
Was this page helpful?