aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-spinner
diff options
context:
space:
mode:
Diffstat (limited to 'kvision-modules/kvision-spinner')
-rw-r--r--kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/KVManagerSpinner.kt2
-rw-r--r--kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt28
2 files changed, 15 insertions, 15 deletions
diff --git a/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/KVManagerSpinner.kt b/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/KVManagerSpinner.kt
index 0de06c8c..ca4d3764 100644
--- a/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/KVManagerSpinner.kt
+++ b/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/KVManagerSpinner.kt
@@ -21,7 +21,7 @@
*/
package pl.treksoft.kvision
-internal val KVManagerSpinnerInit = KVManagerSpinner.init()
+internal val kVManagerSpinnerInit = KVManagerSpinner.init()
/**
* Internal singleton object which initializes and configures KVision spinner module.
diff --git a/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt b/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt
index 7d3af684..b4a8138a 100644
--- a/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt
+++ b/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt
@@ -98,38 +98,38 @@ open class SpinnerInput(
/**
* Spinner value.
*/
- var value by refreshOnUpdate(value, { refreshState() })
+ var value by refreshOnUpdate(value) { refreshState() }
/**
* The value attribute of the generated HTML input element.
*
* This value is placed directly in generated HTML code, while the [value] property is dynamically
* bound to the spinner input value.
*/
- var startValue by refreshOnUpdate(value, { this.value = it; refresh() })
+ var startValue by refreshOnUpdate(value) { this.value = it; refresh() }
/**
* Minimal value.
*/
- var min by refreshOnUpdate(min, { refreshSpinner() })
+ var min by refreshOnUpdate(min) { refreshSpinner() }
/**
* Maximal value.
*/
- var max by refreshOnUpdate(max, { refreshSpinner() })
+ var max by refreshOnUpdate(max) { refreshSpinner() }
/**
* Step value.
*/
- var step by refreshOnUpdate(step, { refreshSpinner() })
+ var step by refreshOnUpdate(step) { refreshSpinner() }
/**
* Number of decimal digits value.
*/
- var decimals by refreshOnUpdate(decimals, { refreshSpinner() })
+ var decimals by refreshOnUpdate(decimals) { refreshSpinner() }
/**
* Spinner buttons type.
*/
- var buttonsType by refreshOnUpdate(buttonsType, { refreshSpinner() })
+ var buttonsType by refreshOnUpdate(buttonsType) { refreshSpinner() }
/**
* Spinner force rounding type.
*/
- var forceType by refreshOnUpdate(forceType, { refreshSpinner() })
+ var forceType by refreshOnUpdate(forceType) { refreshSpinner() }
/**
* The placeholder for the spinner input.
*/
@@ -217,18 +217,18 @@ open class SpinnerInput(
size?.let {
siblings?.find("button")?.addClass(it.className)
}
- this.getElementJQuery()?.on("change", { e, _ ->
+ this.getElementJQuery()?.on("change") { e, _ ->
if (e.asDynamic().isTrigger != null) {
val event = org.w3c.dom.events.Event("change")
this.getElement()?.dispatchEvent(event)
}
- })
- this.getElementJQuery()?.on("touchspin.on.min", { e, _ ->
+ }
+ this.getElementJQuery()?.on("touchspin.on.min") { e, _ ->
this.dispatchEvent("onMinBsSpinner", obj { detail = e })
- })
- this.getElementJQuery()?.on("touchspin.on.max", { e, _ ->
+ }
+ this.getElementJQuery()?.on("touchspin.on.max") { e, _ ->
this.dispatchEvent("onMaxBsSpinner", obj { detail = e })
- })
+ }
refreshState()
}