bindEach
fun <Inputs : Any, Events : Any, State, W : SimplePanel> W.bindEach(viewModel: BallastViewModel<Inputs, Events, List<State>>, equalizer: (State, State) -> Boolean? = null, factory: SimplePanel.(State) -> Unit): W(source)
An extension function which binds the container to the given ballast view model of a list of items.
Parameters
Inputs
the inputs type
Events
the events type
State
the state type
W
the container type
viewModel
the ballast view model instance
equalizer
optional custom equalizer function
factory
a function which re-creates the view based on the given state
fun <Inputs : Any, Events : Any, State : Any, T, W : SimplePanel> W.bindEach(viewModel: BallastViewModel<Inputs, Events, State>, sub: (State) -> List<T>, equalizer: (T, T) -> Boolean? = null, factory: SimplePanel.(T) -> Unit): W(source)
An extension function which binds the container to the given ballast view model using the sub extractor function to get a list of items.
Parameters
Inputs
the inputs type
Events
the events type
State
the state type
T
the sub state type
W
the container type
viewModel
the ballast view model instance
sub
an extractor function
equalizer
optional custom equalizer function
factory
a function which re-creates the view based on the given state