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

99
Views
how can i change a nested object 'property value' in React?

I want when the user start typing inside a input field age from and to property value to get update so i can send the information to the backend.

my onBlur eventhandler dosen't work i get a undefiend: 43(user typed num for exam) property outside of age object on my state;

code

  const [advancedSearch, setAdvancedSearch] = useState({
    selectIdentify: "",
    type: "",
    gender: "",
    age: { from: "", to: "" },
  });

==========================
                   <TextField
                    label="Age From"
                    type="number"
                   onBlur={(e) =>
                      setAdvancedSearch((data) => ({
                        ...data,
                        ["age"["from"]]: e.target.value,
                      }))
                    }
                  />
                  <TextField
                    label="Age To"
                    type="number"
                   onBlur={(e) =>
                      setAdvancedSearch((data) => ({
                        ...data,
                        ["age"["to"]]: e.target.value,
                      }))
                    }
                  />
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!