3 responsive tables in 3 jQuery Tabs

3 responsive tables in 3 jQuery Tabs

MelodyNelsonMelodyNelson Posts: 213Questions: 33Answers: 2

Link to test case: https://live.datatables.net/qelelegu/5/edit
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

Hi,

In the test case below, if you resize the output page for a smaller width, you'll see that the tables in the others tabs won't be resized. If you change tab and resize again, only the visible DT is resized correctly and don't « go outside » the width limit of the tab.

https://live.datatables.net/qelelegu/5/edit

On my website, I'm using this code on one table because I add to adjust the columns of totals rowgrouping.

initComplete: function () {
            debounceDraw( this.api() );
        }

// timer (en millisecondes) pour recalculer le tableau après redimensionnement (nécessite underscore.js)
    function debounceDraw(table) {
        var drawDebouncedFn = _.debounce(function() {
            console.log('resize');
            table.draw();
        }, 500);
        table.on('responsive-resize', drawDebouncedFn);
    }

@kthorngren already helped me with this code ^^
https://datatables.net/forums/discussion/78718/problem-with-orderfixed-on-a-complex-dt-row-group-responsive-etc

Should I add the debounceDraw on something else that initiComplete for each DT inside the tabs ?

Thanks

This question has accepted answers - jump to:

Answers

Sign In or Register to comment.