children

fun <T> children(items: Iterable<T>, id: (T) -> Any, isSticky: (T) -> Boolean? = null, isFullSpan: (T) -> Boolean? = null, spanSize: (T) -> Int? = null, 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

isSticky

A function that indicates if the child should fix to the top of the collection when it is scrolled out of view

isFullSpan

A function that indicates whether the child should span across all columns

spanSize

A function to return the number of columns that a child should span

componentFunction

A function that generates a Component from a data model


fun <T> children(items: List<T>, id: (T) -> Any, deps: (T) -> Array<Any?>, isSticky: (T) -> Boolean? = null, isFullSpan: (T) -> Boolean? = null, spanSize: (T) -> Int? = null, 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

isSticky

A function that indicates if the child should fix to the top of the collection when it is scrolled out of view

isFullSpan

A function that indicates whether the child should span across all columns

spanSize

A function to return the number of columns that a child should span

componentFunction

A function that generates a Component from a data model