From 8f4570f5aa288aa4c2efcbd6c89da65f449b0c2b Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 23 May 2020 01:24:14 +0200 Subject: Fix for the TabulatorRemote component regression. --- .../src/main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kvision-modules/kvision-tabulator-remote') diff --git a/kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt b/kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt index 21bfc5d4..7e2b533e 100644 --- a/kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt +++ b/kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt @@ -73,8 +73,8 @@ open class TabulatorRemote( val callAgent = CallAgent() @Suppress("UnsafeCastFromDynamic") - val beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = options.ajaxConfig.beforeSend - options.ajaxConfig.beforeSend = undefined + val beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = options.ajaxConfig?.beforeSend + if (beforeSend != null) options.ajaxConfig.beforeSend = undefined options.ajaxURL = urlPrefix + url.drop(1) options.ajaxRequestFunc = { _, _, params -> val page = params.page -- cgit