Responsive class control based on container size...

Responsive class control based on container size...

BradF79BradF79 Posts: 2Questions: 1Answers: 0

I'm using a responsive implementation within a container with a specific size and initialization works great and hides the columns that do not fit within the container. However, the classes min-phone-l, min-tablet, desktop etc... aren't working based on the size of the container, but the size of the screen. Is it possible to get these to work based on the size of the table container? Or perhaps some other method to do what I want?

Answers

  • BradF79BradF79 Posts: 2Questions: 1Answers: 0

    Was able to do this by changing the _resize function. In the variable declarations at the top:

        //var width = $(window).width();
        var scrolling = dt.settings()[0].oScroll;
        var bar = scrolling.sY || scrolling.sX ? scrolling.iBarWidth : 0;
        var width = dt.table().container().offsetWidth - bar;
    
This discussion has been closed.