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

163
Views
Select box not resetting - React JS

This might be pretty basic but i am not able to find out what is wrong here. I have a react form in which i am using a custom select box to list the students. I want to clear the selection when isChecked is set to false.

 let studentId = watch("std.id"); // is of type number
      
<Select
 name="std.id"
 placeholder="Select Students"
 registerResult={register("std.id")}
 list={studentList}
 disabled={!isChecked}
/> 

I tried emptying with "" the value also tried assigning it to null like below, but didnt work. can anyone tell me why is it not resetting?

if(!isChecked){
  studentId = null;  //Select box still shows the selected value even after this
}

        
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!