children

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

parentWidthPercent

A function that sets the fill width of the child based on the parent container's size

parentHeightPercent

A function that sets the fill height of the child based on the parent container's size

componentFunction

A function that generates a Component from a data model


fun <T> children(items: Iterable<T>, id: (T) -> Any, deps: (T) -> Array<Any?>, isSticky: (T) -> Boolean? = null, parentWidthPercent: (T) -> Float? = null, parentHeightPercent: (T) -> Float? = 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

parentWidthPercent

A function that sets the fill width of the child based on the parent container's size

parentHeightPercent

A function that sets the fill height of the child based on the parent container's size

componentFunction

A function that generates a Component from a data model