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

componentFunction

A function that generates a Component from a data model


fun <T> children(items: List<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

componentFunction

A function that generates a Component from a data model