aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2020-02-09 22:53:12 +0100
committerRobert Jaros <rjaros@finn.pl>2020-02-09 22:53:12 +0100
commit069b1a1fbf51b7cd5ff82cbdc676f477fc4a3976 (patch)
tree52c214818e539638ea689acd8de93fb4836c4877
parent8dc78d8725e4af290aa99fc943e695b3220777a9 (diff)
downloadkvision-069b1a1fbf51b7cd5ff82cbdc676f477fc4a3976.tar.gz
kvision-069b1a1fbf51b7cd5ff82cbdc676f477fc4a3976.tar.bz2
kvision-069b1a1fbf51b7cd5ff82cbdc676f477fc4a3976.zip
Disallow null value for RangeInput
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/range/RangeInput.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/range/RangeInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/range/RangeInput.kt
index 5ad854d0..dc9ad7d4 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/range/RangeInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/range/RangeInput.kt
@@ -182,7 +182,8 @@ open class RangeInput(
protected open fun refreshState() {
value?.let {
getElementJQuery()?.`val`(it)
- } ?: getElementJQueryD()?.`val`(min)
+ }
+ if (value == null) value = min
}
/**