Datatable not resizing in Boostrap tabs

Datatable not resizing in Boostrap tabs

VirtualJVirtualJ Posts: 2Questions: 2Answers: 0

Hi all
I'm using DT within BS-5 tabs and hit an issue - the DT's aren't resizing when the tab is selected.
I've used this code on other sites and it works fine there - but not on this site.

The console message appears, so the tab is firing as expected, but the table isn't resizing.

Any pointers would be most welcome :-)

        $i('a[data-bs-toggle="tab"]').on("shown.bs.tab", function (e) {
            console.log( 'show tab' );
            $i($i.fn.dataTable.tables(true)).DataTable()
            .columns.adjust()
            .responsive.recalc();
        });

Answers

Sign In or Register to comment.