From f8ff7ea49d2154d249c79a8c9591614793213e9e Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sun, 9 Feb 2020 00:01:31 +0100 Subject: Fix constructor parameters order --- .../main/kotlin/pl/treksoft/kvision/form/select/SelectRemote.kt | 8 ++++---- .../kotlin/pl/treksoft/kvision/form/select/SelectRemoteInput.kt | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'kvision-modules/kvision-bootstrap-select-remote/src/main') diff --git a/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemote.kt b/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemote.kt index 0c1df008..550de427 100644 --- a/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemote.kt +++ b/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemote.kt @@ -50,10 +50,10 @@ import pl.treksoft.kvision.utils.SnOn */ @Suppress("TooManyFunctions") open class SelectRemote( - value: String? = null, serviceManager: KVServiceManager, function: suspend T.(String?, String?, String?) -> List, stateFunction: (() -> String)? = null, + value: String? = null, name: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, @@ -160,7 +160,7 @@ open class SelectRemote( private val idc = "kv_form_SelectRemote_$counter" final override val input: SelectRemoteInput = SelectRemoteInput( - value, serviceManager, function, stateFunction, multiple, ajaxOptions, preload, + serviceManager, function, stateFunction, value, multiple, ajaxOptions, preload, setOf("form-control") ).apply { this.id = idc @@ -268,18 +268,18 @@ open class SelectRemote( * It takes the same parameters as the constructor of the built component. */ fun Container.selectRemote( - value: String? = null, serviceManager: KVServiceManager, function: suspend T.(String?, String?, String?) -> List, stateFunction: (() -> String)? = null, + value: String? = null, name: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, preload: Boolean = false, label: String? = null, rich: Boolean = false, init: (SelectRemote.() -> Unit)? = null ): SelectRemote { val selectRemote = SelectRemote( - value, serviceManager, function, stateFunction, + value, name, multiple, ajaxOptions, diff --git a/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemoteInput.kt b/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemoteInput.kt index 391b53ef..96277728 100644 --- a/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemoteInput.kt +++ b/kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl/treksoft/kvision/form/select/SelectRemoteInput.kt @@ -55,10 +55,10 @@ external fun decodeURIComponent(encodedURI: String): String */ @UseExperimental(ImplicitReflectionSerializer::class) open class SelectRemoteInput( - value: String? = null, serviceManager: KVServiceManager, function: suspend T.(String?, String?, String?) -> List, private val stateFunction: (() -> String)? = null, + value: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, private val preload: Boolean = false, @@ -190,10 +190,10 @@ open class SelectRemoteInput( * It takes the same parameters as the constructor of the built component. */ fun Container.selectRemoteInput( - value: String? = null, serviceManager: KVServiceManager, function: suspend T.(String?, String?, String?) -> List, stateFunction: (() -> String)? = null, + value: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, preload: Boolean = false, @@ -201,10 +201,10 @@ fun Container.selectRemoteInput( ): SelectRemoteInput { val selectRemoteInput = SelectRemoteInput( - value, serviceManager, function, stateFunction, + value, multiple, ajaxOptions, preload, -- cgit