diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-01-23 11:00:00 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-01-23 11:00:00 +0100 |
commit | 48153da7cd97c57a60ca1032d19cdec0714c4c04 (patch) | |
tree | 45ab0bcf19bcb0ad205ad4422d10d5be75f10407 /README.md | |
parent | 6c8d768508142c8a6a672b94311c8e9257f15735 (diff) | |
download | kvision-48153da7cd97c57a60ca1032d19cdec0714c4c04.tar.gz kvision-48153da7cd97c57a60ca1032d19cdec0714c4c04.tar.bz2 kvision-48153da7cd97c57a60ca1032d19cdec0714c4c04.zip |
Data container enhancements and fixes.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -153,16 +153,16 @@ Application package will be saved as build/distributions/showcase.zip. ### Data binding with observable data model class Data(text: String) : BaseDataComponent() { - var text: String by obs(text) + var text by obs(text) } val model = observableListOf( Data("One"), Data("Two"), Data("Three") ) - Root("root").add(DataContainer(model, { index, data -> + Root("root").add(DataContainer(model, { data, _, _ -> Label(data.text) - }, child = HPanel(spacing = 10, wrap = FlexWrap.WRAP))) + }, HPanel(spacing = 10, wrap = FlexWrap.WRAP))) GlobalScope.launch { // Kotlin coroutines while (true) { |