aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/state/ObservableList.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/state/ObservableList.kt b/src/main/kotlin/pl/treksoft/kvision/state/ObservableList.kt
index 7d41e05c..44e115eb 100644
--- a/src/main/kotlin/pl/treksoft/kvision/state/ObservableList.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/state/ObservableList.kt
@@ -35,6 +35,10 @@ interface ObservableList<T> : MutableList<T>, ObservableState<List<T>> {
class ObservableListWrapper<T>(val mutableList: MutableList<T> = mutableListOf()) : MutableList<T>, ObservableList<T>,
ObservableState<List<T>> {
+ override fun getState(): List<T> {
+ return this
+ }
+
override fun subscribe(observer: (List<T>) -> Unit): () -> Unit {
onUpdate += observer
observer(this)