JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/responsive/2.4.1/js/dataTables.responsive.min.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/responsive/2.4.1/css/responsive.dataTables.min.css">
<script src="https://cdn.datatables.net/select/1.6.2/js/dataTables.select.min.js"></script>
<table id="example" class="display nowrap" style="width:100%">
        <thead>
            <tr>
                <th>First name</th>
                <th>Last name</th>
                <th>Position</th>
                <th>Office</th>
                <th>Age</th>
                <th>Start date</th>
                <th>Salary</th>
                <th>Extn.</th>
                <th>E-mail</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Row with optional data</td>
                <td>Nixon</td>
                <td>System Architect</td>
                <td>Edinburgh</td>
                <td>61</td>
                <td>2011-04-25</td>
                <td>$320,800</td>
                <td>5421</td>
                <td>[email protected]</td>
            </tr>
            <tr>
                <td>Row without optional data</td>
                <td>Nixon</td>
                <td>System Architect</td>
                <td>Edinburgh</td>
                <td>61</td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
            </tr>
        </tbody>
    </table>

CSS

td.noHidden::before{
  display: none !important;
}

JavaScript

$(document).ready(function() {

    var tableObject = $('#example').DataTable(
    { 
      responsive : true,
      select : true

    });
    
     tableObject.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
        var hasHidden = false;
        var controlElement;
        $(this.node()).children().each(
            function(index, element){
                if ($(element).hasClass("dtr-control"))  controlElement = $(element)
                if($(element).hasClass("dtr-hidden")){
                    if($(element).text() != ""){
                        hasHidden = true;
                    }
                }
                
            }
        );

        if(!hasHidden) {
            controlElement.addClass("noHidden");
        }
    });
    });