Right column is not fixed all the way to the right of the dataTable

Right column is not fixed all the way to the right of the dataTable

tim_krugertim_kruger Posts: 1Questions: 1Answers: 0

Hi All

Hope everyone's doing well today. I'm having a problem where when setting the fixed columns options to both left and right, and only having horizontal scrolling the right column is not fixed all the way to the right of the dataTables table, seem like it's there's a little space that's catering for a vertical scroll bar as well.

So my question is how would I fixed it all the way to the right of the dataTable? Here is my code:

oPackageTable = $( "#package-table" ).dataTable({
    processing: true,
    serverSide: true,
    ajax: "{{ url( 'auth/packagesandspecials/get-packages' ) }}",
    columns: [
        {
            data:   "package_id",
            render: function ( data, type, row ) {
                if ( type === 'display' ) {
                    return '<input type="checkbox" class="editor-active">';
                }
                return data;
            },
            className: "dt-body-center"
        }
        ,{ "data": 'package_reference', "targets": 2 }
        ,{ "data": 'holiday_type_desc', "targets": 3 }
        ,{ "data": 'country_name', "targets": 4 }
        ,{ "data": 'supplier_reference', "targets": 5 }
        ,{ "data": 'package_heading', "class": "nowrap", "targets": 6 }
        ,{ "data": 'availability', "class": "nowrap", "targets": 7 }
        ,{ "data": 'location_name', "class": "nowrap", "targets": 8 }
        ,{ "data": 'per_person_sharing_rate', "targets": 9 }
        ,{ "data": 'per_person_single_rate', "targets": 10 }
        ,{ "data": 'short_description', "class": "nowrap", "targets": 11 }
        ,{ "data": 'long_description', "class": "nowrap", "targets": 12 }
        ,{ "data": 'terms_and_conditions_desc', "class": "nowrap", "targets": 13 }
        ,{ "data": 'includes', "class": "nowrap", "targets": 14 }
        ,{ "data": 'excludes', "class": "nowrap", "targets": 15 }
        ,{
            data:   "package_id",
                render: function ( data, type, row ) {
                    if ( type === 'display' ) {
                        return "<a onclick=\"open_package_dialog('" + data + "');\">Edit</a>&nbsp;<a onclick=\"delete_package('" + data + "');\">Delete</a>";
                    }
                    return data;
                },
                className: "dt-body-center"
            }
        ]
        ,fixedColumns: {
            leftColumns: 1,
            rightColumns: 1
        }
        ,"pagingType": "full_numbers"
        ,scrollCollapse: true
        ,scrollX: true
        ,stateSave: true
});
This discussion has been closed.