aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-select
diff options
context:
space:
mode:
Diffstat (limited to 'kvision-modules/kvision-select')
-rw-r--r--kvision-modules/kvision-select/src/main/kotlin/pl/treksoft/kvision/form/select/Select.kt4
-rw-r--r--kvision-modules/kvision-select/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt10
-rw-r--r--kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt2
-rw-r--r--kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt2
-rw-r--r--kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptGroupSpec.kt2
-rw-r--r--kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt2
-rw-r--r--kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt2
7 files changed, 12 insertions, 12 deletions
diff --git a/kvision-modules/kvision-select/src/main/kotlin/pl/treksoft/kvision/form/select/Select.kt b/kvision-modules/kvision-select/src/main/kotlin/pl/treksoft/kvision/form/select/Select.kt
index f19081e1..db8a5b3b 100644
--- a/kvision-modules/kvision-select/src/main/kotlin/pl/treksoft/kvision/form/select/Select.kt
+++ b/kvision-modules/kvision-select/src/main/kotlin/pl/treksoft/kvision/form/select/Select.kt
@@ -39,7 +39,7 @@ import pl.treksoft.kvision.utils.SnOn
* [SelectOption] or [SelectOptGroup] components to the container.
*
* @constructor
- * @param options an optional list of options (label to value pairs) for the select control
+ * @param options an optional list of options (value to label pairs) for the select control
* @param value selected value
* @param name the name attribute of the generated HTML input element
* @param multiple allows multiple value selection (multiple values are comma delimited)
@@ -55,7 +55,7 @@ open class Select(
) : SimplePanel(setOf("form-group")), StringFormControl {
/**
- * A list of options (label to value pairs) for the select control.
+ * A list of options (value to label pairs) for the select control.
*/
var options
get() = input.options
diff --git a/kvision-modules/kvision-select/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt b/kvision-modules/kvision-select/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt
index 7ffdf2c2..9ae1a4e9 100644
--- a/kvision-modules/kvision-select/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt
+++ b/kvision-modules/kvision-select/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt
@@ -50,7 +50,7 @@ enum class SelectWidthType(internal val value: String) {
* [SelectOption] or [SelectOptGroup] components to the container.
*
* @constructor
- * @param options an optional list of options (label to value pairs) for the select control
+ * @param options an optional list of options (value to label pairs) for the select control
* @param value selected value
* @param multiple allows multiple value selection (multiple values are comma delimited)
* @param ajaxOptions additional options for remote (AJAX) data source
@@ -64,9 +64,9 @@ open class SelectInput(
) : SimplePanel(classes), FormInput {
/**
- * A list of options (label to value pairs) for the select control.
+ * A list of options (value to label pairs) for the select control.
*/
- internal var options by refreshOnUpdate(options) { setChildrenFromOptions() }
+ var options by refreshOnUpdate(options) { setChildrenFromOptions() }
/**
* A value of the selected option.
*/
@@ -337,14 +337,14 @@ open class SelectInput(
/**
* Makes the input element focused.
*/
- open fun focus() {
+ override fun focus() {
getElementJQuery()?.focus()
}
/**
* Makes the input element blur.
*/
- open fun blur() {
+ override fun blur() {
getElementJQuery()?.blur()
}
diff --git a/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index 37d7a9df..13c8531b 100644
--- a/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -86,7 +86,7 @@ interface WSpec : DomSpec {
fun runW(code: (widget: Widget, element: Element?) -> Unit) {
run {
- val root = Root("test", true)
+ val root = Root("test", fixed = true)
val widget = Widget()
widget.id = "test_id"
root.add(widget)
diff --git a/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt b/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt
index 30f42e9c..bfd93900 100644
--- a/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt
+++ b/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectInputSpec.kt
@@ -34,7 +34,7 @@ class SelectInputSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", true)
+ val root = Root("test", fixed = true)
val selectInput = SelectInput(listOf("test1" to "Test 1", "test2" to "Test 2"), "test1", true).apply {
liveSearch = true
placeholder = "Choose ..."
diff --git a/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptGroupSpec.kt b/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptGroupSpec.kt
index bd88f560..33ccc843 100644
--- a/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptGroupSpec.kt
+++ b/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptGroupSpec.kt
@@ -33,7 +33,7 @@ class SelectOptGroupSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", true)
+ val root = Root("test", fixed = true)
val selectOptGroup = SelectOptGroup("Group", listOf("test1" to "Test 1", "test2" to "Test 2"), 2)
root.add(selectOptGroup)
val element = document.getElementById("test")
diff --git a/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt b/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt
index f7e07d42..33c36576 100644
--- a/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt
+++ b/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectOptionSpec.kt
@@ -32,7 +32,7 @@ class SelectOptionSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", true)
+ val root = Root("test", fixed = true)
val selectOption = SelectOption("testValue", "testLabel")
root.add(selectOption)
val element = document.getElementById("test")
diff --git a/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt b/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt
index eaccd551..9eddff81 100644
--- a/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt
+++ b/kvision-modules/kvision-select/src/test/kotlin/test/pl/treksoft/kvision/form/select/SelectSpec.kt
@@ -34,7 +34,7 @@ class SelectSpec : DomSpec {
@Test
fun render() {
run {
- val root = Root("test", true)
+ val root = Root("test", fixed = true)
val select = Select(listOf("test1" to "Test 1", "test2" to "Test 2"), "test1", null, true, null, "Label").apply {
liveSearch = true
placeholder = "Choose ..."