children
fun <T> children(items: Iterable<T>, id: (T) -> Any, componentFunction: ComponentCreationScope.(T) -> Component?)
Add a list of children generated by applying componentFunction to each item in a list of models.
Parameters
items
Data models to be rendered as children
id
A function to create a unique id from each data model
component Function
A function that generates a Component from a data model
fun <T> children(items: Iterable<T>, id: (T) -> Any, deps: (T) -> Array<Any?>, componentFunction: ComponentCreationScope.(T) -> Component?)
Add a list of children generated by applying componentFunction to each item in a list of models.
Parameters
items
Data models to be rendered as children
id
A function to create a unique id from each data model
deps
A function to create a list of deps from each data model
component Function
A function that generates a Component from a data model