kvision / pl.treksoft.kvision.form.select

Package pl.treksoft.kvision.form.select

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

Types

AjaxOptions

data class AjaxOptions

Data class for AJAX options.

DataType

enum class DataType

Data type for the AJAX call.

HttpType

enum class HttpType

HTTP protocol type for the AJAX call.

Select

open class Select : SimplePanel, StringFormControl

The form field component for Select control.

SelectDropdownAlign

enum class SelectDropdownAlign

Select dropdown align. See Bootstrap Select width.

SelectInput

open class SelectInput : SimplePanel, FormInput

The basic component for Select control.

SelectOptGroup

open class SelectOptGroup : SimplePanel

The helper container for adding option groups to Select.

SelectOption

open class SelectOption : Widget

The helper component for adding options to Select or SelectOptGroup.

SelectRemote

open class SelectRemote<T : Any> : SimplePanel, StringFormControl

The form field component for SelectRemote control.

SelectRemoteInput

open class SelectRemoteInput<T : Any> : SelectInput

The Select control connected to the multiplatform service.

SelectWidthType

enum class SelectWidthType

Select width types. See Bootstrap Select width.

SimpleSelect

open class SimpleSelect : SimplePanel, StringFormControl

The form field component for SimpleSelect control.

SimpleSelectInput

open class SimpleSelectInput : SimplePanel, FormInput

Simple select component.

Functions

decodeURIComponent

external fun decodeURIComponent(encodedURI: String): String

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

DSL builder extension function.

selectInput

fun Container.selectInput(options: List<StringPair>? = null, value: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, classes: Set<String> = setOf(), init: (SelectInput.() -> Unit)? = null): SelectInput

DSL builder extension function.

selectOptGroup

fun Select.selectOptGroup(label: String, options: List<StringPair>? = null, maxOptions: Int? = null, disabled: Boolean = false, classes: Set<String> = setOf(), init: (SelectOptGroup.() -> Unit)? = null): SelectOptGroup
fun SelectInput.selectOptGroup(label: String, options: List<StringPair>? = null, maxOptions: Int? = null, disabled: Boolean = false, classes: Set<String> = setOf(), init: (SelectOptGroup.() -> Unit)? = null): SelectOptGroup

DSL builder extension function.

selectOption

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> = setOf(), init: (SelectOption.() -> Unit)? = null): SelectOption
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> = setOf(), init: (SelectOption.() -> Unit)? = null): SelectOption
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> = setOf(), init: (SelectOption.() -> Unit)? = null): SelectOption

DSL builder extension function.

selectRemote

fun <T : Any> Container.selectRemote(value: String? = null, serviceManager: KVServiceManager<T>, function: suspend T.(String?, String?, String?) -> List<<ERROR CLASS>>, stateFunction: (() -> String)? = null, name: String? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, label: String? = null, rich: Boolean = false, init: (SelectRemote<T>.() -> Unit)? = null): SelectRemote<T>

DSL builder extension function.

selectRemoteInput

fun <T : Any> Container.selectRemoteInput(value: String? = null, serviceManager: KVServiceManager<T>, function: suspend T.(String?, String?, String?) -> List<<ERROR CLASS>>, stateFunction: (() -> String)? = null, multiple: Boolean = false, ajaxOptions: AjaxOptions? = null, classes: Set<String> = setOf(), init: (SelectRemoteInput<T>.() -> Unit)? = null): SelectRemoteInput<T>

DSL builder extension function.

simpleSelect

fun Container.simpleSelect(options: List<StringPair>? = null, value: String? = null, emptyOption: Boolean = false, name: String? = null, label: String? = null, rich: Boolean = false, init: (SimpleSelect.() -> Unit)? = null): SimpleSelect

DSL builder extension function.

simpleSelectInput

fun Container.simpleSelectInput(options: List<StringPair>? = null, value: String? = null, emptyOption: Boolean = false, classes: Set<String> = setOf(), init: (SimpleSelectInput.() -> Unit)? = null): SimpleSelectInput

DSL builder extension function.

toJs

fun AjaxOptions.toJs(emptyOption: Boolean): dynamic

Convert AjaxOptions to JavaScript JSON object.