Datatable responsive does not load responsively on first load

Datatable responsive does not load responsively on first load

carlojune24carlojune24 Posts: 1Questions: 1Answers: 0
edited January 14 in Free community support

Datatable responsive does not load responsively on first load but if window resize the responsive api will effect.

What i have done so far:

    $('#example').DataTable( {
                    responsive: {
                        details: {
                            display: $.fn.dataTable.Responsive.display.modal( {
                                header: function ( row ) {
                                    var data = row.data();
                                    return 'Details for '+data[0]+' '+data[1];
                                }
                            } ),
                            renderer: $.fn.dataTable.Responsive.renderer.tableAll( {
                                tableClass: 'table'
                            } )
                        }
                    }
                } );

table:
<table id="example" class="table table-striped table-bordered" style="width: 100%;">

Edited by Kevin:  Syntax highlighting. Details on how to highlight code using markdown can be found in this guide

Answers

Sign In or Register to comment.