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

93
Vistas
SetState of the selected option in the dropdown

My code looks like

placeholder="select banana or apple or cat" 

options=[
    {label : "Apple", value=2},
    { label : "Banana", value=3 },
    { label : "Cat", value=5}
]

value = { this.state.selectedOptions}
isSearchable={false}
isDisabled={this.state.isEdit === true}

and an onChange event. I am having an array called "result" which is storing a property called "list". This list is an array that contains "Entity-Type". If the Entity-type is 2 I should get Apple, if it's 3 I should get Banana, If it's 5 I should get cat. I need to set the state to map my options and Entity-Type. I don't know how to do that as I am new to react. I am able to see the Entity-Type in my response tab in dev tools but I am not seeing the selected option in my UI. I can see the option that I selected in before saving the package but after saving the package, whenever I want to Edit it I can see only placeholder there that is disabled. My package should have only one type of option. I have a heads up that is I should use result.list[0].EntityType.value for mapping.

about 4 years ago · Santiago Gelvez
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