Accepted answer

the error is pretty descriptive. you cannot pass parameter of type string into the usestate hook which expects number.

you're calling the setidpadre hook with the variable, which is a string.

what you can do instead is convert the value into a number:

{ (e) => setidpadre( parseint( ) }

Related Query

More Query from same tag