diff options
Diffstat (limited to 'kvision-modules')
4 files changed, 6 insertions, 9 deletions
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 d6abc0f6..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 @@ -29,7 +29,6 @@ import kotlinx.serialization.list import kotlinx.serialization.stringify import org.w3c.dom.get import pl.treksoft.kvision.core.Container -import pl.treksoft.kvision.core.onEvent import pl.treksoft.kvision.remote.CallAgent import pl.treksoft.kvision.remote.HttpMethod import pl.treksoft.kvision.remote.JsonRpcRequest @@ -115,7 +114,7 @@ open class SelectRemoteInput<T : Any>( preserveSelected = ajaxOptions?.preserveSelected ?: true ) if (this.ajaxOptions?.emptyRequest == true) { - this.onEvent { + this.setInternalEventListener<SelectRemote<*>> { shownBsSelect = { val input = self.getElementJQuery()?.parent()?.find("input") input?.trigger("keyup", null) diff --git a/kvision-modules/kvision-bootstrap-select/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt b/kvision-modules/kvision-bootstrap-select/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt index a96e614e..01b35ed2 100644 --- a/kvision-modules/kvision-bootstrap-select/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt +++ b/kvision-modules/kvision-bootstrap-select/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt @@ -28,7 +28,6 @@ import pl.treksoft.kvision.core.Container import pl.treksoft.kvision.core.CssSize import pl.treksoft.kvision.core.StringBoolPair import pl.treksoft.kvision.core.StringPair -import pl.treksoft.kvision.core.onEvent import pl.treksoft.kvision.form.FormInput import pl.treksoft.kvision.form.InputSize import pl.treksoft.kvision.form.ValidationStatus @@ -150,7 +149,7 @@ open class SelectInput( init { setChildrenFromOptions() - this.onEvent { + this.setInternalEventListener<SelectInput> { change = { val v = getElementJQuery()?.`val`() self.value = v?.let { @@ -312,7 +311,8 @@ open class SelectInput( SelectDropdownAlign.AUTO -> { sn.add("data-dropdown-align-right" to "auto") } - else -> {} + else -> { + } } return sn } diff --git a/kvision-modules/kvision-bootstrap-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt b/kvision-modules/kvision-bootstrap-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt index f195234a..3a52fed2 100644 --- a/kvision-modules/kvision-bootstrap-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt +++ b/kvision-modules/kvision-bootstrap-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt @@ -27,7 +27,6 @@ import pl.treksoft.kvision.core.Container import pl.treksoft.kvision.core.StringBoolPair import pl.treksoft.kvision.core.StringPair import pl.treksoft.kvision.core.Widget -import pl.treksoft.kvision.core.onEvent import pl.treksoft.kvision.form.FormInput import pl.treksoft.kvision.form.InputSize import pl.treksoft.kvision.form.ValidationStatus @@ -152,7 +151,7 @@ open class SpinnerInput( ButtonsType.HORIZONTAL -> this.addSurroundingCssClass("kv-spinner-btn-horizontal") } this.surroundingSpan = true - this.onEvent { + this.setInternalEventListener<SpinnerInput> { change = { self.changeValue() } diff --git a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt index a7f8992a..3fa6cd36 100644 --- a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt +++ b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt @@ -28,7 +28,6 @@ import pl.treksoft.kvision.core.CssSize import pl.treksoft.kvision.core.ResString import pl.treksoft.kvision.core.StringBoolPair import pl.treksoft.kvision.core.StringPair -import pl.treksoft.kvision.core.onEvent import pl.treksoft.kvision.html.Button import pl.treksoft.kvision.html.ButtonStyle import pl.treksoft.kvision.html.ButtonType @@ -356,7 +355,7 @@ internal class DropDownButton( init { this.id = id if (!forNavbar && !forDropDown) this.role = "button" - onEvent { + setInternalEventListener<DropDownButton> { click = { e -> if (parent?.parent is ContextMenu) { e.asDynamic().dropDownCM = true |