-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to customize datatable ajax callback #6383
Comments
The |
It would be nice if ABP could provide a customizable calback like below createAjax: function (serverMethod, inputAction, responseCallback) {
return function (requestData, callback, settings) {
// same old code
if (callback) {
serverMethod(input).then(result => {
callback({
recordsTotal: result.totalCount,
recordsFiltered: result.totalCount,
data: result.items
});
if (responseCallback)
responseCallback(result);
});
}
}; |
ok, I will give it a try. |
maliming
added a commit
that referenced
this issue
Dec 4, 2020
Thank you. That's exactly what I want |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I saw the code in this file datatable-extension.js
At the end of
datatables.createAjax
function, from Line 360 to Line 368 is where the ajax request is sent.I have 2 questions as below
callback
function which is called at Line 362, what should I do?result
from the response to thecallback
function at Line 362I could write my own code to achieve above but I wonder if there is any configuration related (if there is then what I have to do will much more simple)
ABP Framework version
User Interface:
The text was updated successfully, but these errors were encountered: