JSFiddle - React, Tailwind, and code Playground

HTML

<table>
    <tr>
        <td>
            <input type="text" name="raz15" />
        </td>
        <td>
            <input type="checkbox" name="ray15" />
        </td>
    </tr>
    <tr>
        <td>
            <input type="text" name="raz16" />
        </td>
        <td>
            <input type="checkbox" name="ray16" />
        </td>
    </tr>
</table>

CSS

input {margin: 5px;}

JavaScript

$('input[type=text]').bind('hastext', function () {
  $(this).parent().parent().$find('input[type=checkbox]').attr('checked', 'checked');
});

$('input[type=text]').bind('notext', function () {
  $(this).parent().parent().$find('input[type=checkbox]').removeAttr("checked");
});