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

Viewed 50

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?

1 Answers
Related