Disable the highlighting when selecting rows by checkboxes

Disable the highlighting when selecting rows by checkboxes

nsmcannsmcan Posts: 2Questions: 1Answers: 0

Hello, is there a way to disable the highlighting when selecting rows by checkboxes?

Answers

  • nsmcannsmcan Posts: 2Questions: 1Answers: 0

    There was an old question about the same

    Unfortunately, it was closed. I'd like to add my solution there.

    Create the following CSS:

    /* Disable highlighting of selected items in the datatables */
    table.dataTable.dt-select-no-highlight tbody tr.selected,
    table.dataTable.dt-select-no-highlight tbody th.selected, 
    table.dataTable.dt-select-no-highlight tbody td.selected {
        color: unset;
    }
    table.dataTable.dt-select-no-highlight tbody>tr.selected, 
    table.dataTable.dt-select-no-highlight tbody>tr>.selected {
        background-color: unset;
    }
    

    Add the dt-select-no-highlight class to your table definition, for example:

    <table class="table table-condensed table-striped dt-select-no-highlight">
    </table>
    

    Profit

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Thanks for posting back :). Yes, your solution looks good to me.

    Allan

Sign In or Register to comment.