kvision / pl.treksoft.kvision.form.select / SelectOption

SelectOption

(js) open class SelectOption : Widget

The helper component for adding options to Select or SelectOptGroup.

Constructors

(js)

<init>

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())

Properties

(js)

disabled

Determines if the option should be disabled.

var disabled: Boolean
(js)

divider

Determines if the option should be rendered as divider.

var divider: Boolean
(js)

icon

The icon before the label of the option.

var icon: String?
(js)

label

The label of the option.

var label: String?
(js)

selected

Determines if the option is selected.

var selected: Boolean
(js)

subtext

The subtext after the label of the option.

var subtext: String?
(js)

value

The value of the option.

var value: String?

Functions

(js)

getSnAttrs

Returns list of element attributes in the form of a List.

open fun getSnAttrs(): List<StringPair>
(js)

render

Renders current component as a Snabbdom vnode.

open fun render(): VNode

Extension Properties

(js)

changeFlow

val <T : Widget> T.changeFlow: Flow<T>
(js)

clickFlow

val <T : Widget> T.clickFlow: Flow<T>
(js)

inputFlow

val <T : Widget> T.inputFlow: Flow<T>

Extension Functions

(js)

addBsBgColor

fun Component.addBsBgColor(bsBgColor: BsBgColor): Unit
(js)

addBsBorder

fun Component.addBsBorder(vararg bsBorder: BsBorder): Unit
(js)

addBsClearfix

fun Component.addBsClearfix(): Unit
(js)

addBsColor

fun Component.addBsColor(bsColor: BsColor): Unit
(js)

addBsRounded

fun Component.addBsRounded(vararg bsRounded: BsRounded): Unit
(js)

contextMenu

DSL builder extension function.

fun Widget.contextMenu(fixedPosition: Boolean = false, classes: Set<String> = setOf(), init: (ContextMenu.() -> Unit)? = null): ContextMenu
(js)

eventFlow

fun <T : Widget> T.eventFlow(event: String): Flow<Pair<T, Event>>
(js)

onEvent

fun <T : Widget> T.onEvent(block: SnOn<T>.() -> Unit): Int
(js)

removeBsBgColor

fun Component.removeBsBgColor(bsBgColor: BsBgColor): Unit
(js)

removeBsBorder

fun Component.removeBsBorder(vararg bsBorder: BsBorder): Unit
(js)

removeBsClearfix

fun Component.removeBsClearfix(): Unit
(js)

removeBsColor

fun Component.removeBsColor(bsColor: BsColor): Unit
(js)

removeBsRounded

fun Component.removeBsRounded(vararg bsRounded: BsRounded): Unit
(js)

setContextMenu

Sets context menu for the current widget.

fun Widget.setContextMenu(contextMenu: ContextMenu): Widget
(js)

style

DSL builder extension function.

fun Widget.style(className: String? = null, init: (Style.() -> Unit)? = null): Style