Buttons dropdown off-alignment

Buttons dropdown off-alignment

bpdoverbpdover Posts: 6Questions: 1Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

I'm having a weird situation and can't find a previous forum post to help me with this. I moved the table buttons off the main table and when i click the button the dropdown menu appears all the way to the left and never right under the clicked button. is there a way to correct this? This happens even if I use the buttons within DataTables.

here is the issue, the dropdown for the "Download" button does not align right under the button.

here is the code to build the buttons
function addTableButtons(messageTop) {
var table = $('#mainTable').DataTable();

    new $.fn.dataTable.Buttons( table, {
        buttons: [ 'colvis', 
            { extend: 'collection',
                text: 'Download',
                className: "btnArrow",
                buttons: [ 
                    { extend: "pdf",
                        messageTop: messageTop, 
                        orientation: 'landscape',
                        exportOptions: {
                        columns: ':visible', rows: ':visible' }                      
                    },
                    { extend: "excel",
                        messageTop: messageTop,
                        exportOptions: {
                        columns: ':visible', rows: ':visible' }                      
                    },                  
                    { extend: "csv",
                        exportOptions: {
                        columns: ':visible', rows: ':visible' }                      
                    }
                ] 
            },
            { extend: "print",
                text: "Print Report",
                messageTop: messageTop,
                exportOptions: {
                columns: ':visible', rows: ':visible' }                      
            }
        ]  
    } );

    table.buttons( 0, null ).containers().appendTo( '#filterTopCriteria' ); 
};

Replies

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • bpdoverbpdover Posts: 6Questions: 1Answers: 0

    Hi Colin,

    Apologies for the late reply, here is the test case

    http://live.datatables.net/cucugewu/1/

    once you view it, it is off but not that bad, but if you edit it on the "Edit in JS Bin", then it is really off, same as the one i get in the normal page.

    Thanks
    Bis

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Ah, thanks for the test case. That was an issue that was resolved earlier. I've updated your test case to use the nightly builds, and you'll see it behaving as expected. We hope to push this release in the next month or so.

    Colin

This discussion has been closed.