bindEach

fun <S, W : SimplePanel> W.bindEach(signal: Signal<List<S>>, equalizer: (S, S) -> Boolean? = null, factory: W.(S) -> Unit): W(source)

An extension function which binds the container to the given signal with a list of items.

Parameters

signal

the Signal instance

equalizer

optional custom equalizer function

factory

a function which re-creates the view based on the given state

Type Parameters

S

the state type

W

the container type


fun <S, T, W : SimplePanel> W.bindEach(signal: Signal<S>, sub: (S) -> List<T>, equalizer: (T, T) -> Boolean? = null, factory: SimplePanel.(T) -> Unit): W(source)

An extension function which binds the container to the given signal with a list of items using the substate extractor.

Parameters

signal

the Signal instance

sub

an extractor function for substate

equalizer

optional custom equalizer function

factory

a function which re-creates the view based on the given state

Type Parameters

S

the state type

T

the substate type

W

the container type