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

303
Vistas
How to send event and object as parameters to Javascript eventlistener function?

So I'm writing Javascript and using a Material Ui Select component. This component has a parameter "onChange" which triggers if a new drop-down item is selected.

onChange={(event) => {
    let newObj = {
        'param1': value1,
        'param2': value2,
        ...
    }
    handleChangeTemplates(event, newObj);
}}

When debugging the function "handleChangeTemplates", it receives the "event" object correctly, but does something weird (to me anyway) with the other object. Here's how it looks during debugging:

valuesObject image

How can I properly send all my parameters that I need to the function, during the "onChange" event?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I am not sure how whole code looks like but valuesObj somehow pointing react element.

I have created same component in code sandbox an it working fine. Please check that, It may help.

https://codesandbox.io/s/basicselect-material-demo-forked-mnc45?file=/demo.js

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