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
Robert Jaros
02/15/2021, 12:28 PM
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
jschneider
02/15/2021, 1:51 PM
Thanks. I don't get all the details yet, but it is working for me 😉