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

211
Views
How can I do this when I clicked button with data it will selected value on select option data with NextJS?

Hello I am beginner with NextJS how can I do when I click button it will selected values on select option data like example with this link https://www.mobicom.mn/mn/shop/newnumber#/ after click first 4 digit below select options it will change on select option above how can I do this and fetch data next to first 4 digits? This is buttons with data

This is select option tags

When i click 7801 button it will get 78 01 on select option?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I'm assuming you trying to work out how to get data and handle states

const App = () =>{
  const [state,setState] = useState();

  return (
    <select onChange={(e) => setState(e.currentTarget.value)} value={state}>
      <option value="1">Value 1 </option>
      <option value="2">Value 2</option>
      <option value="2">Value 3</option>
    </select>
  )
}

This is a very basic example, we use the "onChange" on the select to get its currectly selected value, once you "change" it it will set the state to the value e.g. setState('some value here') changes the value of state

about 4 years ago · Juan Pablo Isaza Report
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!