Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

222
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda