kvision / pl.treksoft.kvision.state / ObservableList

ObservableList

interface ObservableList<T> : MutableList<T>, ObservableState<List<T>>

Observable list interface.

Properties

onUpdate

abstract val onUpdate: MutableCollection<(MutableList<T>) -> Unit>

Inherited Functions

subscribe

abstract fun subscribe(observer: (S) -> Unit): () -> Unit

Subscribe for the state change notifications.

Extension Functions

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.

syncWithList

fun <T> MutableList<T>.syncWithList(list: List<T>): Unit

Utility extension function to synchronise elements of the MutableList.

Inheritors

ObservableListWrapper

class ObservableListWrapper<T> : MutableList<T>, ObservableList<T>, ObservableState<List<T>>

Simple observable list implementation.