JSFiddle - React, Tailwind, and code Playground

HTML

<table>
  <tr>
    <td><input type="checkbox" value="test" /></td>
    <td><a class="editbutton" href="#">edit</a></td>
  </tr>
</table>

JavaScript

$('.editbutton').click(function() {
    $(this).closest('td').prev().find('input[type=checkbox]').prop('checked', true);
});