You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
In jquery.dataTables.odata.js on about lines 88-96, I updated as follows locally:
//Added if condition to fix blank filter issue
if (asFilters.length > 0) {
data.$filter = asFilters.join(" or ");
}
var asOrderBy = []; // What about desc? sSortDir_0 = "desc"
for (var i = 0; i < oParams.iSortingCols; i++) {
asOrderBy.push(oParams["mDataProp_" + oParams["iSortCol_" + i]] + " " + (oParams["sSortDir_0"] || ""));
}
data.$orderby = asOrderBy.join();
I never completed the project or attempted to update github - please do so if you find it makes things better...
________________________________
From: Worthy7 <notifications@github.com>
Sent: 19 January 2017 09:26
To: vpllan/jQuery.dataTables.oData
Cc: noakesey; Author
Subject: Re: [vpllan/jQuery.dataTables.oData] Sort order doesn't work for oData v4. (#11)
Can you expand slightly as to where we should put this code, thanks
-
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#11 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AKeA1opoTQw_NJPI0Rc87ufNRXs3nehlks5rTyxCgaJpZM4Djjbp>.
From my experience, asc and desc always appear in sSortDir_0 and so I updated the following locally. This needs more investigation
asOrderBy.push(oParams["mDataProp_" + oParams["iSortCol_" + i]] + " " + (oParams["sSortDir_0"] || ""));
The text was updated successfully, but these errors were encountered: