简体   繁体   中英

JQuery Datatable Responsiveness Issue with Fixed Column

When I use fixed column in JQuery Datatable it doesn't work properly if I resize the window.

If I remove scrollX from options, it appears just fine however fixedColumn feature doesn't work then.

See my options below:

$(document).ready(function() {
    $('#example').DataTable( {
        scrollY:        300,
        scrollX:        true,
        scrollCollapse: true,
        paging:         false,
        fixedColumns:   true,

    } );
} );

Link To Jsfiddle

Just Add width="100%" in your table tag.

It should be working by doing this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM