Loading background visible with scrollResize and just a few records

Loading background visible with scrollResize and just a few records

nitewulf50nitewulf50 Posts: 6Questions: 1Answers: 0
edited January 2022 in Free community support

Please assist me with fixing the CSS or datatable options to properly get the table to fill it's wrapper's space without showing the loading background that the scroller uses.

Link to test case: http://live.datatables.net/kisiroya/1/edit

Replies

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    You were using very old version of the libraries - when updated they appear to be behaving as you want: http://live.datatables.net/kisiroya/2/edit

    Colin

  • nitewulf50nitewulf50 Posts: 6Questions: 1Answers: 0

    http://live.datatables.net/kisiroya/4/edit

    Thanks for pointing out the old versions there of datatables. I double checked and made sure i have the most current scroller and scrollresizer. When using both of them the loading background appears when there are less records to fill the available space.

    I thought using those together was the recommended approach?

  • allanallan Posts: 63,234Questions: 1Answers: 10,417 Site admin

    Thanks for the test case. No question there is an error there somewhere. I'll check into it and report back.

    Allan

  • allanallan Posts: 63,234Questions: 1Answers: 10,417 Site admin

    Just been looking into this more, and I think that the test case you gave is actually working as expected.

    The container height is set to 75vh which it is. But there are only three rows in the table (I hadn't clicked with that before - I thought there were more and it was displaying three our of a larger number). Those three are displayed.

    If it is just that you don't want he hashed background add:

    div.dts div.dataTables_scrollBody {
      background: transparent;
    }
    

    http://live.datatables.net/kisiroya/8/edit

    Allan

  • nitewulf50nitewulf50 Posts: 6Questions: 1Answers: 0

    Yeah I'm using the same .js and wrapper styling for some tables and feeding it a dynamic number of columns/rows from an ajax source and some have only a few records.

    Transparent background. That will work. Thanks.

    Scott

Sign In or Register to comment.