JSFiddle - React, Tailwind, and code Playground

HTML

<table id='tbl1' style='border: solid 1px red'>
    <tr><td>File Name</td>
    <td>File Size</td>
    <td>Date Modified</td></tr>

<tr data-index="5">
    <td><input type='checkbox'  class='chkclass' name=''  value='1' />       </td>
 <td>500,b</td>
 <td>yes</td>
    </tr>
 </table>

  <table id='tbl2' style='border: solid 1px blue; margin-top: 10px'>
  </table>

JavaScript

$(function(){
        $("#tbl1 input:checkbox.chkclass").click(function(){
         if ($(this).is(":checked"))
           {
             $(this).closest("tr").clone().appendTo("#tbl2");
           }
        else
          {
            var index = $(this).closest("tr").attr("data-index");
            var findRow = $("#tbl2 tr[data-index='" + index + "']");
            findRow.remove();
         }
       });
      });