0
How to detect the TH I clicked and pass parameter in React?
I wanted to make an ordination, but I’m having a hard time getting past a parameter in a TH function that I clicked, can someone help me with this?
ordertableBy = async(ev) => {
console.log(ev.target.value);
alert('orderby' + ev.target.value);
}
<tr>
<th onClick={ev => this.ordertableBy(ev)}>Nome</th>
<th onClick={ev => this.ordertableBy(ev)}>Email</th>
<th onClick={ev => this.ordertableBy(ev)}>Telefone</th>
</tr>
Is returning order Undefined
Our thanks Joseph! Saved! Thank you!
– Niibbii