Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

207
Views
onChange throwing error - React register method for forms

I have a custom component for a select input as below. i am passing regResult as a prop to this component. regResult is of type regResult: UseFormRegister; which is a register method.

<CustomSelect
 name="id"
 placeholder={User Id}
 regResult={register("id", {
            onChange: (e) => console.log(e)
          })}  
 doctorList={filteredDoctorList}
 disabled={!iChecked}
/>
export declare type UseFormRegister= {
  onChange: ChangeHandler;
  onBlur: ChangeHandler;
  ref: RefCallBack;
  name: InternalFieldName;
};

onChange: (e) => console.log(e) // is throwing error "Argument of type '{ onChange: (e: any) => void; }' is not assignable to parameter of type 'Partial"

can anyone tell me what exactly is the issue here. Thanks in advance

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!