JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<tr>
<td><span class="table-rows">check row</span>
<label><input type="checkbox" /> row1 check1</label></td>
<td><label><input type="checkbox" /> row1 check2</label></td>
</tr>
<tr>
<td><span class="table-rows">check row</span>
<label><input type="checkbox" /> row2 check1</label></td>
<td><label><input type="checkbox" /> row2 check2</label></td>
</tr>
</table>
CSS
table tr td {
padding:10px;
}
.table-rows {
color:#2123fb;
cursor:pointer;
padding-right:3em;
}
JavaScript
$('input[type=checkbox]').click(function(){
if ($(this).attr('checked')) {
$(this).closest('tr').find('input[type=checkbox]:checked').not(this).removeAttr('checked');
}
});
$('.table-rows').click(function(){
$(this).closest('table').find('input[type=checkbox]').removeAttr('checked');
$(this).closest('tr').find('input[type=checkbox]:first').attr('checked','checked');
});