JSFiddle - React, Tailwind, and code Playground

HTML

<BUTTON ID="ADD">ADD</button>
<BUTTON ID="DEL">DELETE</button>
<TABLE>
    <TR>
        <TD>
            <INPUT TYPE='CHECKBOX' />
        </TD>
        <TD>
            <INPUT TYPE='TEXT' CLASS='MYTEXT'/>
        </TD>
        <TD>SOMETHING</TD>
    </TR>
</TABLE>

JavaScript

$("#ADD").click(function(){
    $("table").append($("tr:last").clone(true));
    $("tr:last input").val("");
});

$("#DEL").click(function(){
    var totalRows = $("table tr").length;
    var totalRowsChecked = $("table tr input:checked").length;
    if(totalRows == totalRowsChecked){
        $("table tr:not(:first) input:checked").parents('tr').remove();
    }else{
        $("table tr input:checked").parents('tr').remove();
    }
});