how to get value from useForm on change input ? #1098
Unanswered
ahmerarain
asked this question in
Q&A
Replies: 1 comment 3 replies
-
const form = useForm({
defaultValues: {
name: user?.firstName + " " + user?.lastName || "",
},
onSubmit: async ({ value }) => {
console.log(value);
},
validators: {
onChange: (form) => {
console.log("test", form);
},
},
}); this might get you where you want but I think "onChange" is not meant to be used this way. Your linter would cry. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
when value changes in input i want to get here instantly
const form = useForm({
defaultValues: {
name: user?.firstName + " " + user?.lastName || "",
},
onSubmit: async ({ value }) => {
console.log(value);
},
});
Beta Was this translation helpful? Give feedback.
All reactions