I have this table in my react component. I need to apply onClick on all the <tr> but need to exclude last column(<td>).
Is is possible to do that?
<tr
className="cursor-pointer"
key={activity._id}
onClick={() =>
activeTab === "active"
? this.setState({ activity, completeModal: true })
: this.setState({ activity, showModal: true })
}
>
<td>{moment(activity.date).format("MM/DD/YY h:mm a")}</td>
<td>{activity.manifestNumber}</td>
<td>
<NumberFormat
thousandSeparator={true}
displayType={"text"}
value={activity.grossWeight}
/>{" "}
lbs
</td>
<td>{activity.facility.name}</td>
</tr>