From 33215e5c31b55617edf0d95e47e9e720fe4b9dd6 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Thu, 24 Oct 2019 19:54:16 +0200 Subject: Allow suspending functions for SelectRemote and TabulatorRemote components. --- .../main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kvision-modules/kvision-remote/src/main/kotlin') diff --git a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt index dd54a979..5c7cac7f 100644 --- a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt +++ b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt @@ -132,8 +132,8 @@ actual open class KVServiceManager actual constructor(serviceClass: KCl * Binds a given function of the receiver as a select options source * @param function a function of the receiver */ - protected actual fun bind( - function: T.(String?, String?, String?) -> List + protected actual fun bindSelectRemote( + function: suspend T.(String?, String?, String?) -> List ) { val routeDef = "route${this::class.simpleName}${counter++}" calls[function.toString().replace("\\s".toRegex(), "")] = Pair("/kv/$routeDef", HttpMethod.POST) @@ -143,8 +143,8 @@ actual open class KVServiceManager actual constructor(serviceClass: KCl * Binds a given function of the receiver as a tabulator component source * @param function a function of the receiver */ - protected actual inline fun bind( - noinline function: T.(Int?, Int?, List?, List?) -> RemoteData + protected actual inline fun bindTabulatorRemote( + noinline function: suspend T.(Int?, Int?, List?, List?) -> RemoteData ) { val routeDef = "route${this::class.simpleName}${counter++}" calls[function.toString().replace("\\s".toRegex(), "")] = Pair("/kv/$routeDef", HttpMethod.POST) -- cgit