https://kotlinlang.org logo
k

Kevin

09/13/2018, 6:46 AM
Would this be a valid use case for using a reference to a UI element, or is there something else I could do?
myList
still has all the same references, so from the observability standpoint it hasn't changed, so I need to tell it to refresh somehow.
Copy code
var myList = mutableListOf<MutableThing>().observable()
override val root = vbox {
    lv = listview(myList)
    button {
        action {
            myList.forEach { mutate(it) }
            lv.refresh()
        }
    }
}