pagination not working
pagination not working
montoyam
Posts: 568Questions: 136Answers: 5
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
I am using this cdn
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:
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
ah, yes, that was it.
Is that fix going to make it into the CDN?
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
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