One question for listTag: I have an ObservableStat...
# kvision
j
One question for listTag: I have an ObservableState that contains a list of objects. is it possible to create a list that is automatically updated whenever the list is changed?
r
The easiest way:
Copy code
vPanel {
                val state = ObservableValue(listOf("one", "two", "three"))

                button("change").onClick {
                    state.value = state.value + "new one ${state.value.size + 1}"
                }

                listTag(state, ListType.UL) {
                    elements = it
                }
            }
j
Thanks. I don't get all the details yet, but it is working for me 😉