How to get datatable's Processing... message to display in front of Table while using scrollX?

How to get datatable's Processing... message to display in front of Table while using scrollX?

mgrossmgross Posts: 2Questions: 1Answers: 0

Hi, I'm working on an application that uses a datatable. I'm trying to get the displayed "Processing..." message that occurs when the table is loading more data to appear in front of the datatable, which normally works fine and looks like this

However, after I enable scrollX: true, the message becomes obscured behind the table like this

Any idea about what is going on? I want to have X scrolling enabled an have the processing message shown over top of the table

Here is the code for my datatable

    $('#my-table').dataTable({
        "order": [[2, "desc"]],            
        buttons: [
        'print',
        'copyHtml5',
       ]
        dom: 'Bfrtip',
        searching: false,
        serverSide: true,
        processing: true,
        scrollX: true,
        type: "POST"
    });

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Answer ✓

    It looks like it might be a z-index issue. Could you add:

    div.dataTables_processing {
      z-index: 1;
    }
    

    to your CSS? I believe that should address it.

    Allan

  • mgrossmgross Posts: 2Questions: 1Answers: 0

    That's done it. Thank you Allan! I had tried something similar before to no effect, I must have got the CSS selector syntax wrong.

  • SudarshSudarsh Posts: 1Questions: 0Answers: 0
    edited April 2020

    Thank you so much Allan for the solution. It is working fine....

This discussion has been closed.