bindEach

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

An extension function which binds the container to the observable state with a list of items.

Parameters

S

the state type

W

the container type

observableState

the state

equalizer

optional custom equalizer function

factory

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


fun <S, T, W : SimplePanel> W.bindEach(observableState: ObservableState<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 observable state with a list of items using the sub state extractor.

Parameters

S

the state type

T

the sub state type

W

the container type

observableState

the state

sub

an extractor function for sub state

equalizer

optional custom equalizer function

factory

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