pagination not working

pagination not working

montoyammontoyam Posts: 568Questions: 136Answers: 5
edited August 2021 in SearchPanes

It seems that I can't change pages when a user selects a filter in a searchPane. I am using Bootstrap4. Is this a known issue?

I am using a .net MVC project and can not provide a link. There are no errors displayed in the console. I can change pages no problem when no filter is set.

Here is a the layout of one of my tables. However, I am finding this issue on all of my dataTables in this project

    EquipmentOnLoanTable = $('#EquipmentOnLoan').DataTable({
        dom: 'Pfrtip',
        ajax: 'api/EquipmentOnLoan',
        searchPanes: {
            cascadePanes: true,
            viewTotal: true,
            controls: false,
            layout: 'columns-2',
            threshold: 1,
            //columns: [1, 2, 3, 4], //alertDates, alerts, CaseStatus, openActions
            emptyMessage: "<i><b>none</b></i>"
        },
        columns: [
            {
                title: 'Status',
                data: null,
                render: function (data, type, row) {
                    var status='Ready to Bill';
                    if (row.DeptFundOrg == null) { status = 'Missing Fund/Org' };
                    if (row.RateName == null) { status = 'Missing Rate' };
                    return status;
                }
                , searchPanes: { show: true }
                
            },
            {
                title: "Rates",
                className: 'details-control',
                orderable: false,
                defaultContent: '',
                width: '10%'
                , searchPanes: { show: false }
            },
            { data: "LOANID", title: "Loan ID", searchPanes: { show: false } },
            { data: "DEPTNAME", title: "Department (SD+)", searchPanes: { show: true } },
            { data: "LoanStartDate", title: "Loan Start Date", searchPanes: { show: false } },
            { data: "LoanEndDate", title: "Date Returned", searchPanes: { show: false } },
            { data: "RequestedBy", title: "Requested By", searchPanes: { show: false } },
            { data: "RESOURCENAME", title: "Resource Name", searchPanes: { show: false } },
            { data: "COMPONENTNAME", title: "Device", searchPanes: { show: false } },
            { data: "COMPONENTTYPENAME", title: "Type", searchPanes: { show: false } },
            { data: "DeptFundOrg", title: "Dept/Fund/Org", searchPanes: { show: false } },
            { data: "RateName", title: "Rate Name", searchPanes: { show: false } },
            {
                data: "MonthlyRate", title: "Monthly Rate",
                render: $.fn.dataTable.render.number(',', '.', 2, '$')
                , searchPanes: { show: false }
            }
        ],
        select: { style: 'single' },
        lengthChange: false
    });

This question has an accepted answers - jump to answer

Answers

  • montoyammontoyam Posts: 568Questions: 136Answers: 5

    I am using this cdn

    <script type="text/javascript" charset="utf-8" src="https://cdn.datatables.net/v/bs4-4.1.1/jqc-1.12.4/moment-2.18.1/jszip-2.5.0/pdfmake-0.1.36/dt-1.10.21/b-1.6.2/b-html5-1.6.2/r-2.2.5/sp-1.3.0/sl-1.3.1/datatables.min.js"></script>
    
  • montoyammontoyam Posts: 568Questions: 136Answers: 5
    edited August 2021

    I found this post:
    https://datatables.net/forums/discussion/68867/paging-in-searchpanes-not-working-when-cascadepanes-true#latest

    however, I added this at the end of my script and am still seeing the same issue:

    <script src="https://nightly.datatables.net/searchpanes/js/dataTables.searchPanes.js?_=5c6e38dbaaf467e0d790080ff9947c2c"></script>
    
  • kthorngrenkthorngren Posts: 21,376Questions: 26Answers: 4,957
    edited August 2021

    Did you change your CDN to remove SearchPanes? If not you are loading it twice which is not recommended. Open the CDN link and it will provide a link to the Download Builder with your selected options. Remove SearchPanes and try with the new CDN.

    Kevin

  • montoyammontoyam Posts: 568Questions: 136Answers: 5

    ah, yes, that was it.

    Is that fix going to make it into the CDN?

  • kthorngrenkthorngren Posts: 21,376Questions: 26Answers: 4,957

    At some point the nightly code is rolled into a new production version. The developers might be able to tell you when the next release will be posted.

    Kevin

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    We're aiming to release today or tomorrow - this will be a big one with new version of many of the extensions, so please keep an eye on the blog and the release notes.

    Colin

Sign In or Register to comment.