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
Conditional fields and validation?
visible is false, lastName should not validate here....Different validation strategy when there is an error
onBlur by default but when there's an error in a field, revalidate that field using onChange? RHF has a onTouched mode for validation that take care of thiscreating a form context and using useField from that context
0.33.0
i did something link this
FormContext createContext<ReactFormApi<[type inferred from zod schema]>
...Globally logging user interactions
Any advantage to setting defaultValues instead of setFieldValue?
how to disable field based async validation if value === defaultValue
Reset field meta data
Visible fields are always isTouched
How to sync with external store like Zustand?
persist() middleware.
My current solution utilizes the internal Store api to subscribe to store changes. I then update the Zustand store with new store values as they come. In the following snippet, you'll see that I have tried subscribing in two ways. Directly calling subscribe outside of a useEffect causes nearly 100 store updates. The current approach only updates the store 5 times, and this may be acceptable since this causes no rendering issues (the store values are only grabbed at component mount). Here is my current solution:
```TypeScript...Custom Meta value for field?
Get index of pushed value in field array
pushValue() method. For context, I have an add/edit modal that renders an item in the modal that I am either adding or editing, and that is determined by the index in the array. This is fine with selecting an item to edit because the index was already defined, but when adding I would have to do something like `setSelectedIndex(form.state.values.items?.length...Array of Forms
Resetting validation errors
valibotValidator deprecated
'valibotValidator' is deprecated.ts(6385)
validator.d.ts(11, 4): The declaration was marked as deprecated here.
'valibotValidator' is deprecated.ts(6385)
validator.d.ts(11, 4): The declaration was marked as deprecated here.
Does onMount not show validation errors?
Solid Start Actions + TanStack Form
UseField example?
UseField hook? hopeully someone can point me to a repo with an eaxmple? thanks in advanceLinked fields and onChangeAsync
onChangeAsync. onChangeListenTo does not work when using onChangeAsync? When I change to onChange it works as intended.
Maybe I am not approaching this problem the way I should....is it possible to use form values as a useMemo dependency ?