JSFiddle - React, Tailwind, and code Playground
HTML
<button id='add'>add</button>
<table id='table1'>
<tbody>
<tr>
<td><input checked='checked' type='checkbox' /></td>
<td>1</td>
<td>1a</td>
<td>1b</td>
</tr>
<tr>
<td><input checked='checked' type='checkbox' /></td>
<td>2</td>
<td>2a</td>
<td>2b</td>
</tr>
<tr>
<td><input checked='checked' type='checkbox' /></td>
<td>3</td>
<td>3a</td>
<td>3b</td>
</tr>
<tr>
<td><input checked='checked' type='checkbox' /></td>
<td>4</td>
<td>4a</td>
<td>4b</td>
</tr>
<tr>
<td><input checked='checked' type='checkbox' /></td>
<td>5</td>
<td>5a</td>
<td>5b</td>
</tr>
<tr>
<td><input checked='checked' type='checkbox' /></td>
<td>6</td>
<td>6a</td>
<td>6b</td>
</tr>
<tr>
<td><input checked='checked' type='checkbox' /></td>
<td>7</td>
<td>7a</td>
<td>7b</td>
</tr>
<tr>
<td><input type='checkbox' /></td>
<td>8</td>
<td>8a</td>
<td>8b</td>
</tr>
<tr>
<td><input checked='checked' type='checkbox' /></td>
<td>9</td>
<td>9a</td>
<td>9b</td>
</tr>
</tbody>
</table>
<div> </div>
<table id='table2'>
<tbody>
</tbody>
</table>
CSS
table {
border-collapse: collapse;
}
table td {
border: 1px solid black;
padding:5px;
}
JavaScript
$(document).ready(function() {
$('#add').on("click", function() {
$('#table2 tbody').empty();
var $newrow,
$newcolumn;
$('#table1 tbody input:checked').parent().parent().each(function() {
$newrow = $('<tr></tr>').appendTo($('#table2 tbody'));
$("td", this).each(function() {
if($("input", this).length == 0) {
$newcolumn = $("<td><input type='text' /></td>").appendTo($newrow);
$("input", $newcolumn).val($(this).text());
}
});
});
});
});