Column Header issue with ScrollY

Column Header issue with ScrollY

dhruvikdesaidhruvikdesai Posts: 1Questions: 1Answers: 0

Hi,
I am having an issue with the datatables. When I am resizing the screen size, Header is still keeping the original width, which is when page loads. Here is my Script.

$(document).ready(function() {
$($.fn.dataTable.tables(true)).DataTable()
.columns.adjust()
.responsive.recalc();

        $('table.table').DataTable({

            "autoWidth": false,         
            "responsive": true,
            "columnDefs": [
                { responsivePriority: 1, targets: 0},
                { responsivePriority: 3, targets: 0},
                { responsivePriority: 4, targets: -1},
                { responsivePriority: 2, targets: -1}                   
            ],
            "scrollY" : "740px",
            "searching": false,
            "info": false,
            "paging": false,
            "ordering": false
        });
    });     
This discussion has been closed.