From 8d5455cc1887a0372b8ea6bd22591f3456c44899 Mon Sep 17 00:00:00 2001 From: Nick Date: Sat, 14 Jan 2017 09:58:03 +0000 Subject: [PATCH] Update datatables-slidingchild.js Added ajax beforeSend to allow caller to specify data for request. --- features/slidingChild/js/datatables-slidingchild.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/features/slidingChild/js/datatables-slidingchild.js b/features/slidingChild/js/datatables-slidingchild.js index cad0464..1d1c522 100644 --- a/features/slidingChild/js/datatables-slidingchild.js +++ b/features/slidingChild/js/datatables-slidingchild.js @@ -55,8 +55,12 @@ else { $.ajax({ type: opts.ajax.requestType, - url: opts.ajax.requestUrl, - data: opts.ajax.requestData, + url: opts.ajax.requestUrl, + beforeSend: function(xhr, settings) { + if (opts.ajax.getRequestData) { + this.data = opts.ajax.getRequestData(dtRow); + } + }, contentType: opts.ajax.contentType, dataType: opts.ajax.dataType, success: function (response) {