Data Container
class DataContainer<M, C, CONT>(model: MutableList<M>, factory: <Error class: unknown class>.(M, Int, MutableList<M>) -> C, container: CONT, containerAdd: CONT.(C, M) -> Unit? = null, filter: (M) -> Boolean? = null, sorter: (M) -> Comparable<*>?? = null, sorterType: () -> SorterType = { SorterType.ASC }, init: DataContainer<M, C, CONT>.() -> Unit? = null) : DataUpdatable
Deprecated
Use kvision-state or kvision-state-flow modules instead. This module will be removed in KVision 6.
A container class with support for mutable/observable data model.
Parameters
M
data model type
C
visual component type
CONT
container type
model
data model of type MutableList
factory
a function which creates component C from data model at given index
container
internal container
container Add
function to add component C to the internal container CONT
filter
a filtering function
sorter
a sorting function
sorter Type
a sorting type selection function
init
an initializer extension function
Constructors
Link copied to clipboard
fun <M, C, CONT> DataContainer(model: MutableList<M>, factory: <Error class: unknown class>.(M, Int, MutableList<M>) -> C, container: CONT, containerAdd: CONT.(C, M) -> Unit? = null, filter: (M) -> Boolean? = null, sorter: (M) -> Comparable<*>?? = null, sorterType: () -> SorterType = { SorterType.ASC }, init: DataContainer<M, C, CONT>.() -> Unit? = null)
Creates DataContainer bound to given data model.
Functions
Link copied to clipboard
Clears notification handler.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard