JSFiddle - React, Tailwind, and code Playground

HTML

<table>
    <thead>
        <tr>
            <th>Click Me</th>
            <th>Groceries</th>
            <th>Price</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td onclick='fncEditCell(this)' class='likeButton'>Edit</td>
            <td>Bananas</td>
            <td>$2</td>
        </tr>
        <tr>
            <td onmouseup='fncEditCell(this)' class='likeButton'>Edit</td>
            <td>Oranges</td>
            <td>$8</td>
        </tr>
        <tr>
            <td onmouseup='fncEditCell(this)' class='likeButton'>Edit</td>
            <td>Top Sirloin</td>
            <td>$20</td>
        </tr>
    </tbody>
    <tfoot>
        <tr>
            <td onmouseup='fncEditCell(this)' class='likeButton'>Edit</td>
            <td>Total</td>
            <td>$30</td>
        </tr>
    </tfoot>
</table>

CSS

.likeButton {
  color : Red; 
  padding : 3px; 
  border : 1px solid #999;
}

JavaScript

window.fncEditCell = function(argThis) {
    alert('Row number of Row Clicked: ' + argThis.parentNode.rowIndex);
};