child

fun child(component: Component?, id: Any? = null, isSticky: Boolean = false, isFullSpan: Boolean = false, spanSize: Int? = null, onNearViewport: OnNearCallback? = null)

Add a child Component to the collection.

Parameters

component

The component to add

id

A unique identifier for the child

isSticky

Fix the child to the top of the collection if it is scrolled out of view

isFullSpan

Span the child across all columns

spanSize

Span the specified number of columns

onNearViewport

A callback that will be invoked when the child is close to or enters the visible area.


fun child(id: Any? = null, isSticky: Boolean = false, isFullSpan: Boolean = false, spanSize: Int? = null, onNearViewport: OnNearCallback? = null, deps: Array<Any?>, componentFunction: ComponentCreationScope.() -> Component?)

Add a child Component created by the provided componentFunction function.

The Component will be created by invoking componentFunction when the child is first rendered. The Component will be reused in subsequent renders unless there is a change to deps. deps is an array of dependencies that should contain any props or state that are used inside componentFunction.

Parameters

id

A unique identifier for the child

isSticky

Fix the child to the top of the collection if it is scrolled out of view

isFullSpan

Span the child across all columns

spanSize

Span the specified number of columns

onNearViewport

A callback that will be invoked when the child is close to or enters the visible area.

deps

An array of prop and state values used by componentFunction to create the Component. A change to one of these values will cause componentFunction to recreate the Component.

componentFunction

A function that returns a Component