Package io.kvision.form.select

Contains a simple select component as well as a full-featured component with support for remote (AJAX) data source.

Types

AjaxOptions
Link copied to clipboard
data class AjaxOptions(url: String?, preprocessData: (dynamic) -> dynamic?, beforeSend: (JQueryXHR, JQueryAjaxSettings) -> dynamic?, data: dynamic, httpType: HttpType, dataType: DataType, minLength: Int, cache: Boolean, clearOnEmpty: Boolean, clearOnError: Boolean, emptyRequest: Boolean, requestDelay: Int, restoreOnError: Boolean, preserveSelected: Boolean, processData: Boolean)
Data class for AJAX options.
DataType
Link copied to clipboard
enum DataType : Enum<DataType>
Data type for the AJAX call.
HttpType
Link copied to clipboard
enum HttpType : Enum<HttpType>
HTTP protocol type for the AJAX call.
Select
Link copied to clipboard
open class Select(options: List<StringPair>?, value: String?, name: String?, multiple: Boolean, ajaxOptions: AjaxOptions?, label: String?, rich: Boolean, init: Select.() -> Unit?) : SimplePanel, StringFormControl, MutableState<String?>
The form field component for Select control.
SelectDropdownAlign
Link copied to clipboard
enum SelectDropdownAlign : Enum<SelectDropdownAlign>
Select dropdown align.
SelectInput
Link copied to clipboard
open class SelectInput(options: List<StringPair>?, value: String?, multiple: Boolean, ajaxOptions: AjaxOptions?, classes: Set<String>, init: SelectInput.() -> Unit?) : SimplePanel, FormInput, MutableState<String?>
The basic component for Select control.
SelectOptGroup
Link copied to clipboard
open class SelectOptGroup(label: String, options: List<StringPair>?, maxOptions: Int?, disabled: Boolean, classes: Set<String>, init: SelectOptGroup.() -> Unit?) : SimplePanel
The helper container for adding option groups to Select.
SelectOption
Link copied to clipboard
open class SelectOption(value: String?, label: String?, subtext: String?, icon: String?, divider: Boolean, disabled: Boolean, selected: Boolean, classes: Set<String>, init: SelectOption.() -> Unit?) : Widget
The helper component for adding options to Select or SelectOptGroup.
SelectWidthType
Link copied to clipboard
enum SelectWidthType : Enum<SelectWidthType>
Select width types.

Functions

bindTo
Link copied to clipboard
fun Select.bindTo(state: MutableState<String?>): Select
Bidirectional data binding to the MutableState instance.
fun Select.bindTo(state: MutableState<String>): Select
Bidirectional data binding to the MutableState instance.
fun SelectInput.bindTo(state: MutableState<String?>): SelectInput
Bidirectional data binding to the MutableState instance.
fun SelectInput.bindTo(state: MutableState<String>): SelectInput
Bidirectional data binding to the MutableState instance.
select
Link copied to clipboard
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
DSL builder extension function.
fun <S> Container.select(state: ObservableState<S>, options: List<StringPair>? = null, value: String? = null, name: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, label: String? = null, rich: Boolean = false, init: Select.(S) -> Unit): Select
DSL builder extension function for observable state.
selectInput
Link copied to clipboard
fun Container.selectInput(options: List<StringPair>? = null, value: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, classes: Set<String>? = null, className: String? = null, init: SelectInput.() -> Unit? = null): SelectInput
DSL builder extension function.
fun <S> Container.selectInput(state: ObservableState<S>, options: List<StringPair>? = null, value: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, classes: Set<String>? = null, className: String? = null, init: SelectInput.(S) -> Unit): SelectInput
DSL builder extension function for observable state.
selectOptGroup
Link copied to clipboard
fun Select.selectOptGroup(label: String, options: List<StringPair>? = null, maxOptions: Int? = null, disabled: Boolean = false, classes: Set<String>? = null, className: String? = null, init: SelectOptGroup.() -> Unit? = null): SelectOptGroup
DSL builder extension function.
fun SelectInput.selectOptGroup(label: String, options: List<StringPair>? = null, maxOptions: Int? = null, disabled: Boolean = false, classes: Set<String>? = null, className: String? = null, init: SelectOptGroup.() -> Unit? = null): SelectOptGroup
DSL builder extension function.
selectOption
Link copied to clipboard
fun Select.selectOption(value: String? = null, label: String? = null, subtext: String? = null, icon: String? = null, divider: Boolean = false, disabled: Boolean = false, selected: Boolean = false, classes: Set<String>? = null, className: String? = null, init: SelectOption.() -> Unit? = null): SelectOption
DSL builder extension function.
fun SelectInput.selectOption(value: String? = null, label: String? = null, subtext: String? = null, icon: String? = null, divider: Boolean = false, disabled: Boolean = false, selected: Boolean = false, classes: Set<String>? = null, className: String? = null, init: SelectOption.() -> Unit? = null): SelectOption
DSL builder extension function.
fun SelectOptGroup.selectOption(value: String? = null, label: String? = null, subtext: String? = null, icon: String? = null, divider: Boolean = false, disabled: Boolean = false, selected: Boolean = false, classes: Set<String>? = null, className: String? = null, init: SelectOption.() -> Unit? = null): SelectOption
DSL builder extension function.
toJs
Link copied to clipboard
fun AjaxOptions.toJs(emptyOption: Boolean): dynamic
Convert AjaxOptions to JavaScript JSON object.