Jquery Datatables set width to column does not work with scrollY

0

I am using the datatables plugin in a modal, where I have a table in it, however if I set a scrollY: to the table, the same modal does not recognize the width of thead, it opens the modal with the width width 0 %, the strange thing is that: by clicking on it it identifies and adjusts normally I've tried columns.adjust (), autoWidth or manually set in html / css and it does not work.

$('#nationality').DataTable({
    dom: 'f<"#head-nationality"t>',
    scrollY: "200px",
    language: {
        "search": "",
        infoEmpty: "Sem Registros",
        searchPlaceholder: "Buscar Nacionalidade",
        emptyTable: "<div class='w-100 text-center p-10 grey'>Nenhuma nacionalidade!</div>",
    },
}); 
    
asked by anonymous 09.11.2018 / 01:46

0 answers