From eb930482e9972a21d39f2aea8b813acf58ff5b64 Mon Sep 17 00:00:00 2001
From: Robert Jaros
+
+
+
+
+
+ Constructor Overrides SimplePanel.addAll Adds a list of components to the current container.
+ Return Overrides SimplePanel.add Adds given component to the current container. Return Additional options for remote (AJAX) data source. Determines if the select is automatically focused. Overrides FormControl.blur Makes the input element blur. Determines if an empty option is automatically generated. Overrides FormControl.flabel Form field label. Overrides FormControl.focus Makes the input element focused. Overrides SimplePanel.getChildren Returns a list of children of the current container. Return Overrides Widget.getSnClass Returns list of CSS class names for current widget in the form of a List. Return Hides dropdown with options. The form field component for Select control. The select control can be populated directly from options parameter or manually by adding
+SelectOption or SelectOptGroup components to the container. Additional options for remote (AJAX) data source. Determines if the select is automatically focused. Determines if an empty option is automatically generated. Form field label. The actual input component. The label text bound to the select element. Determines if live search is available. Maximal number of selected options. Determines if multiple value selection is allowed. A list of options (label to value pairs) for the select control. The placeholder for the select control. Determines if label can contain HTML code. The width of the select control. The width type of the select control. The style of the select control. Validation info component. A value of the selected option. Adds given component to the current container. Adds a list of components to the current container. Makes the input element blur. Makes the input element focused. Returns a list of children of the current container. Returns list of CSS class names for current widget in the form of a List. Hides dropdown with options. Removes given component from the current container. Removes all children from the current container. Removes all event listeners from current widget. Sets an event listener for current widget, keeping the actual type of component. Sets an event listener for current widget. Opens dropdown with options. Toggles visibility of dropdown with options. Protected and final method to add given component to the current container. Returns the array of the children Snabbdom vnodes. Returns the value of the control. Returns the value of the control as a String. Renders current component as a Snabbdom vnode. Sets the value of the control. DSL builder extension function. Overrides FormControl.input The actual input component. The label text bound to the select element. Determines if live search is available. Maximal number of selected options. Determines if multiple value selection is allowed. A list of options (label to value pairs) for the select control. The placeholder for the select control. Overrides SimplePanel.removeAll Removes all children from the current container. Return Overrides Widget.removeEventListeners Removes all event listeners from current widget. Return Overrides SimplePanel.remove Removes given component from the current container. Return Determines if label can contain HTML code. The width type of the select control. The width of the select control. DSL builder extension function. It takes the same parameters as the constructor of the built component. Overrides Widget.setEventListener Sets an event listener for current widget, keeping the actual type of component. Return current widget Example:
+
+<init>
+
+Select(options: List<StringPair>? = null, value: String? = null, name: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, label: String? = null, rich: Boolean = false)
+Parameters
+options
- an optional list of options (label to value pairs) for the select controlname
- the name attribute of the generated HTML input elementmultiple
- allows multiple value selection (multiple values are comma delimited)ajaxOptions
- additional options for remote (AJAX) data sourcelabel
- label text bound to the input elementrich
- determines if label can contain HTML code
+
+
+addAll
+
+open fun addAll(children: List<Component>): SimplePanel
+Parameters
+children
- list of child components
+current container
+
+add
+
+open fun add(child: Component): SimplePanel
+Parameters
+
+
+current container
+
+ajaxOptions
+
+var ajaxOptions: AjaxOptions?
+
+
+autofocus
+
+var autofocus: Boolean?
+
+
+blur
+
+open fun blur(): Unit
+
+
+emptyOption
+
+var emptyOption: Boolean
+
+
+flabel
+
+val flabel: FieldLabel
+
+
+focus
+
+open fun focus(): Unit
+
+
+getChildren
+
+open fun getChildren(): List<Component>
+
+list of children
+
+getSnClass
+
+protected open fun getSnClass(): List<StringBoolPair>
+
+list of CSS class names
+
+hideOptions
+
+open fun hideOptions(): Unit
+
+
+Select
+open class Select : SimplePanel, StringFormControl
+Constructors
+
+
+
+
+
+
+
+
+
+
+
+Select(options: List<StringPair>? = null, value: String? = null, name: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, label: String? = null, rich: Boolean = false)
Properties
+
+
+
+
+
+
+
+
+
+
+var ajaxOptions: AjaxOptions?
+
+
+
+
+
+
+
+var autofocus: Boolean?
+
+
+
+
+
+
+
+var emptyOption: Boolean
+
+
+
+
+
+
+
+val flabel: FieldLabel
+
+
+
+
+
+
+
+val input: SelectInput
+
+
+
+
+
+
+
+var label: String?
+
+
+
+
+
+
+
+var liveSearch: Boolean
+
+
+
+
+
+
+
+var maxOptions: Int?
+
+
+
+
+
+
+
+var multiple: Boolean
+
+
+
+
+
+
+
+var options: List<StringPair>?
+
+
+
+
+
+
+
+var placeholder: String?
+
+
+
+
+
+
+
+var rich: Boolean
+
+
+
+
+
+
+
+var selectWidth: CssSize?
+
+
+
+
+
+
+
+var selectWidthType: SelectWidthType?
+
+
+
+
+
+
+
+var style: ButtonStyle?
+
+
+
+
+
+
+
+val validationInfo: HelpBlock
+
+
+
+
+
+
+
+
+open var value: String?
+Functions
+
+
+
+
+
+
+
+
+
+
+open fun add(child: Component): SimplePanel
+
+
+
+
+
+
+
+open fun addAll(children: List<Component>): SimplePanel
+
+
+
+
+
+
+
+open fun blur(): Unit
+
+
+
+
+
+
+
+open fun focus(): Unit
+
+
+
+
+
+
+
+open fun getChildren(): List<Component>
+
+
+
+
+
+
+
+open fun getSnClass(): List<StringBoolPair>
+
+
+
+
+
+
+
+open fun hideOptions(): Unit
+
+
+
+
+
+
+
+open fun remove(child: Component): SimplePanel
+
+
+
+
+
+
+
+open fun removeAll(): SimplePanel
+
+
+
+
+
+
+
+open fun removeEventListeners(): Widget
+
+
+
+
+
+
+
+open fun <T : Widget> setEventListener(block: SnOn<T>.() -> Unit): Widget
+open fun setEventListener(block: SnOn<Widget>.() -> Unit): Widget
+
+
+
+
+
+
+
+open fun showOptions(): Unit
+
+
+
+
+
+
+
+
+open fun toggleOptions(): Unit
+Inherited Functions
+
+
+
+
+
+
+
+
+
+
+fun addInternal(child: Component): SimplePanel
+
+
+
+
+
+
+
+open fun childrenVNodes(): Array<VNode>
+
+
+
+
+
+
+
+open fun getValue(): String?
+
+
+
+
+
+
+
+open fun getValueAsString(): String?
+
+
+
+
+
+
+
+open fun render(): VNode
+
+
+
+
+
+
+
+
+open fun setValue(v: Any?): Unit
+Companion Object Functions
+
+
+
+
+
diff --git a/api/pl.treksoft.kvision.form.select/-select/input.html b/api/pl.treksoft.kvision.form.select/-select/input.html
new file mode 100644
index 00000000..c05a12ca
--- /dev/null
+++ b/api/pl.treksoft.kvision.form.select/-select/input.html
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+fun Container.select(options: List<StringPair>? = null, value: String? = null, name: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, label: String? = null, rich: Boolean = false, init: Select.() -> Unit = null): Select
+
+
+input
+
+val input: SelectInput
+
+
+label
+
+var label: String?
+
+
+liveSearch
+
+var liveSearch: Boolean
+
+
+maxOptions
+
+var maxOptions: Int?
+
+
+multiple
+
+var multiple: Boolean
+
+
+options
+
+var options: List<StringPair>?
+
+
+placeholder
+
+var placeholder: String?
+
+
+removeAll
+
+open fun removeAll(): SimplePanel
+
+current container
+
+removeEventListeners
+
+open fun removeEventListeners(): Widget
+
+current widget
+
+remove
+
+open fun remove(child: Component): SimplePanel
+Parameters
+
+
+current container
+
+rich
+
+var rich: Boolean
+
+
+selectWidthType
+
+var selectWidthType: SelectWidthType?
+
+
+selectWidth
+
+var selectWidth: CssSize?
+
+
+select
+
+fun Container.select(options: List<StringPair>? = null, value: String? = null, name: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, label: String? = null, rich: Boolean = false, init: Select.() -> Unit = null): Select
+
+
+setEventListener
+
+open fun <T : Widget> setEventListener(block: SnOn<T>.() -> Unit): Widget
+Parameters
+
+
+
+ button.setEventListener<Button> {
+ dblclick = {
+ Alert.show("Button double clicked!")
+ // self is of type Button here
+ }
+ }
open fun setEventListener(block: SnOn<Widget>.() -> Unit): Widget
+Overrides Widget.setEventListener
+Sets an event listener for current widget.
+Return
+
current widget
+ + +Example:
+ + + button.setEventListener {
+ dblclick = {
+ Alert.show("Button double clicked!")
+ // self is of type Widget here
+ }
+ }
+
+
diff --git a/api/pl.treksoft.kvision.form.select/-select/show-options.html b/api/pl.treksoft.kvision.form.select/-select/show-options.html
new file mode 100644
index 00000000..fa16c71c
--- /dev/null
+++ b/api/pl.treksoft.kvision.form.select/-select/show-options.html
@@ -0,0 +1,15 @@
+
+
+
+open fun showOptions(): Unit
+Opens dropdown with options.
+ + diff --git a/api/pl.treksoft.kvision.form.select/-select/style.html b/api/pl.treksoft.kvision.form.select/-select/style.html new file mode 100644 index 00000000..14b2e480 --- /dev/null +++ b/api/pl.treksoft.kvision.form.select/-select/style.html @@ -0,0 +1,15 @@ + + + +var style: ButtonStyle?
+The style of the select control.
+ + diff --git a/api/pl.treksoft.kvision.form.select/-select/toggle-options.html b/api/pl.treksoft.kvision.form.select/-select/toggle-options.html new file mode 100644 index 00000000..3958bb97 --- /dev/null +++ b/api/pl.treksoft.kvision.form.select/-select/toggle-options.html @@ -0,0 +1,15 @@ + + + +open fun toggleOptions(): Unit
+Toggles visibility of dropdown with options.
+ + diff --git a/api/pl.treksoft.kvision.form.select/-select/validation-info.html b/api/pl.treksoft.kvision.form.select/-select/validation-info.html new file mode 100644 index 00000000..bb315130 --- /dev/null +++ b/api/pl.treksoft.kvision.form.select/-select/validation-info.html @@ -0,0 +1,16 @@ + + + +val validationInfo: HelpBlock
+Overrides FormControl.validationInfo
+Validation info component.
+ + diff --git a/api/pl.treksoft.kvision.form.select/-select/value.html b/api/pl.treksoft.kvision.form.select/-select/value.html new file mode 100644 index 00000000..28570db7 --- /dev/null +++ b/api/pl.treksoft.kvision.form.select/-select/value.html @@ -0,0 +1,16 @@ + + + +open var value: String?
+Overrides StringFormControl.value
+A value of the selected option.
+ + -- cgit