Answer the question
In order to leave comments, you need to log in
Why is the event not passed when calling two functions via onClick?
When calling two functions via onClick error: "Cannot read property 'preventDefault' of undefined"
onClick={(e) => {onClickFunc(idx, e); handlerChangeTab(idx);}}
onToggleTab = (val, e) => {
e.preventDefault();
this.setState(() => {
return {
activeTab: val
}
})
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question