You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export default function UserDetails(){
const formikForm = useFormik({
initialValues: {name:"",noOfSubjects:0},
handleSubmit: (values)=> {
console.log(values);
//Here the noOfSubject values in string i want to pass it as number in payload
}
})
return(
Bug report
Current Behavior
interface IUser {
name: string;
noOfSubjects: number;
}
export default function UserDetails(){
const formikForm = useFormik({
initialValues: {name:"",noOfSubjects:0},
handleSubmit: (values)=> {
console.log(values);
//Here the noOfSubject values in string i want to pass it as number in payload
}
})
return(
//Select input with value in number
)
}
//Current Output : {name:"testing",noOfSubject:"1"}
Expected behavior
In the payload of handle submit i want the values with json like ---- {name:"testing",noOfSubject:1}
Reproducible example
Suggested solution(s)
Additional context
Your environment
The text was updated successfully, but these errors were encountered: