diff options
Diffstat (limited to 'kvision-modules/kvision-bootstrap-select-remote/src/main/kotlin/pl')
2 files changed, 6 insertions, 3 deletions
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 dbd0aa70..b4e4738c 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 @@ -166,7 +166,7 @@ open class SelectRemote<T : Any>( this.id = idc this.name = name } - final override val flabel: FieldLabel = FieldLabel(idc, label, rich) + final override val flabel: FieldLabel = FieldLabel(idc, label, rich, setOf("control-label")) final override val invalidFeedback: InvalidFeedback = InvalidFeedback().apply { visible = false } init { 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 e7fd384c..b6319a6b 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 @@ -36,6 +36,7 @@ import pl.treksoft.kvision.remote.KVServiceManager import pl.treksoft.kvision.remote.RemoteOption import pl.treksoft.kvision.utils.JSON import pl.treksoft.kvision.utils.obj +import pl.treksoft.kvision.utils.set import kotlin.browser.window external fun decodeURIComponent(encodedURI: String): String @@ -197,7 +198,9 @@ fun <T : Any> Container.selectRemoteInput( multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, preload: Boolean = false, - classes: Set<String> = setOf(), init: (SelectRemoteInput<T>.() -> Unit)? = null + classes: Set<String>? = null, + className: String? = null, + init: (SelectRemoteInput<T>.() -> Unit)? = null ): SelectRemoteInput<T> { val selectRemoteInput = SelectRemoteInput( @@ -208,7 +211,7 @@ fun <T : Any> Container.selectRemoteInput( multiple, ajaxOptions, preload, - classes + classes ?: className.set ).apply { init?.invoke(this) } |