listbox

fun <T, C : HTMLElement> RenderContext.listbox(classes: String? = null, id: String? = null, scope: ScopeContext.() -> Unit = {}, tag: TagFactory<Tag<C>>, initialize: Listbox<T, C>.() -> Unit): Tag<C>

Factory function to create a Listbox.

API-Sketch:

listbox<T>() {
val value: DatabindingProperty<T>
// inherited by `OpenClose`
val openState: DatabindingProperty<Boolean>
val opened: Flow<Boolean>
val close: SimpleHandler<Unit>
val open: SimpleHandler<Unit>
val toggle: SimpleHandler<Unit>

listboxButton() { }
listboxLabel() { }
listboxValidationMessages() {
val msgs: Flow<List<ComponentValidationMessage>>
}
listboxItems() {
// inherited by `PopUpPanel`
var placement: Placement
var strategy: Strategy
var flip: Boolean
var skidding: Int
var distance: int

// for each T {
listboxItem(entry: T) {
val index: Int
val selected: Flow<Boolean>
val active: Flow<Boolean>
val disabled: Flow<Boolean>
val disable: SimpleHandler<Boolean>
}
// }
}
}

For more information refer to the official documentation


fun <T> RenderContext.listbox(classes: String? = null, id: String? = null, scope: ScopeContext.() -> Unit = {}, initialize: Listbox<T, HTMLDivElement>.() -> Unit): Tag<HTMLDivElement>

Factory function to create a Listbox with a HTMLDivElement as default root Tag.

API-Sketch:

listbox<T>() {
val value: DatabindingProperty<T>
// inherited by `OpenClose`
val openState: DatabindingProperty<Boolean>
val opened: Flow<Boolean>
val close: SimpleHandler<Unit>
val open: SimpleHandler<Unit>
val toggle: SimpleHandler<Unit>

listboxButton() { }
listboxLabel() { }
listboxValidationMessages() {
val msgs: Flow<List<ComponentValidationMessage>>
}
listboxItems() {
// inherited by `PopUpPanel`
var placement: Placement
var strategy: Strategy
var flip: Boolean
var skidding: Int
var distance: int

// for each T {
listboxItem(entry: T) {
val index: Int
val selected: Flow<Boolean>
val active: Flow<Boolean>
val disabled: Flow<Boolean>
val disable: SimpleHandler<Boolean>
}
// }
}
}

For more information refer to the official documentation