combobox
fun <E : HTMLElement, T> RenderContext.combobox(classes: String? = null, id: String? = null, scope: ScopeContext.() -> Unit = {}, tag: TagFactory<Tag<E>>, initialize: Combobox<E, T>.() -> Unit): Tag<E>
Factory function to create a Combobox.
API-Sketch:
combobox<T> {
val items: ItemsHook()
// params: List<T> / Flow<List<T>>
var itemFormat: (T) -> String
val value: DatabindingProperty<T?>
var filterBy: FilterFunctionProperty
// params: (Sequence<T>, String) -> Sequence<T> / T.() -> String
val openDropdown: DropdownOpeningHook
// methods: lazily() / eagerly()
val selectionStrategy: SelectionStrategyProperty
// methods: autoSelectMatch() / manual()
var maximumDisplayedItems: Int = 20
var inputDebounceMillis: Long = 50L
var renderDebounceMillis: Long = 50L
comboboxInput() { }
comboboxPanelReference() {
// this brick is often used with a nested
// comboboxInput() { }
}
comboboxLabel() { }
comboboxItems() {
// inherited by `PopUpPanel`
var placement: Placement
var strategy: Strategy
var flip: Boolean
var skidding: Int
var distance: int
val results: Flow<QueryResult.ItemList<T>>
// results.render {
// for each QueryResult.ItemList<T>.Item<T> {
comboboxItem(Item<T>) { }
// }
// }
}
comboboxValidationMessages() {
val msgs: Flow<List<ComponentValidationMessage>>
}
}
Content copied to clipboard
For more information refer to the official documentation
fun <T> RenderContext.combobox(classes: String? = null, id: String? = null, scope: ScopeContext.() -> Unit = {}, initialize: Combobox<HTMLDivElement, T>.() -> Unit): Tag<HTMLDivElement>
Factory function to create a Combobox with an HTMLDivElement as default root Tag.
API-Sketch:
combobox<T> {
val items: ItemsHook()
// params: List<T> / Flow<List<T>>
var itemFormat: (T) -> String
val value: DatabindingProperty<T?>
var filterBy: FilterFunctionProperty
// params: (Sequence<T>, String) -> Sequence<T> / T.() -> String
val openDropdown: DropdownOpeningHook
// methods: lazily() / eagerly()
val selectionStrategy: SelectionStrategyProperty
// methods: autoSelectMatch() / manual()
var maximumDisplayedItems: Int = 20
var inputDebounceMillis: Long = 50L
var renderDebounceMillis: Long = 50L
comboboxInput() { }
comboboxPanelReference() {
// this brick is often used with a nested
// comboboxInput() { }
}
comboboxLabel() { }
comboboxItems() {
// inherited by `PopUpPanel`
var placement: Placement
var strategy: Strategy
var flip: Boolean
var skidding: Int
var distance: int
val results: Flow<QueryResult.ItemList<T>>
// results.render {
// for each QueryResult.ItemList<T>.Item<T> {
comboboxItem(Item<T>) { }
// }
// }
}
comboboxValidationMessages() {
val msgs: Flow<List<ComponentValidationMessage>>
}
}
Content copied to clipboard
For more information refer to the official documentation