Buttons only show with dom, not container

Buttons only show with dom, not container

bb-workbb-work Posts: 1Questions: 1Answers: 0

I've created two custom buttons, which I want to display.

When I use this code:

table = $('#eventResultsTable').DataTable( {
                    dom: 'Bfrtip',
                    searching: false,
                    buttons: ['graph', 'timeline']
                } );

The buttons display, but it removes the widget that allows the user to select how many records to view.

When I use this code (preferred, because I use bootstrap), they don't show up at all:

table = $('#eventResultsTable').DataTable( {
                    searching: false,
                    buttons: ['graph', 'timeline']
                } );
                
                table.buttons().container()
                .appendTo( $('.col-sm-6:eq(0)', table.table().container() ) );

Please advise.

Answers

This discussion has been closed.