Let me simplify my issue for you:
render (h) {
let events = {onClick: handleClick}
return (<div {...events}></div>)
}
The onClick
event did not get added to the div
element. The spread operator works well with class
and style
attributes but not with any of the event listeners (those starting with on
or nativeOn
). Can someone explain why and provide me with a solution that allows me to bind an arbitrary number of events to an element?