JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<tr>
<td><input type="checkbox">Check All</td>
<td>Head</td>
<td>Amount</td>
</tr>
<tr>
<td><input type="checkbox"></td>
<td>CGST</td>
<td>200</td>
</tr>
<tr>
<td><input type="checkbox"></td>
<td>IGST</td>
<td>200</td>
</tr>
<tr>
<td><input type="checkbox"></td>
<td>CGST</td>
<td>200</td>
</tr>
<tr>
<td><input type="checkbox"></td>
<td>SGST</td>
<td>200</td>
</tr>
<tr>
<td><input type="checkbox"></td>
<td>SGST</td>
<td>200</td>
</tr>
</table>
CSS
td{border:1px solid #666;}
JavaScript
$('body').on('change' , 'tr input' , function () {
var count_checked = 0;
$(this).parent().parent().parent().find('input:checked').each(function() {
count_checked++
})
if(count_checked > 0){
var val = $(this).closest('tr').find('td:eq(1)').text();
$(this).parent().parent().parent().find('input').each(function () {
if ($(this).closest('tr').find('td:eq(1)').text() != val)
{
$(this).prop('disabled' , true)
}
})
$(this).removeAttr('disabled')
} else {
$(this).parent().parent().parent().find("input").removeAttr('disabled')
}
})