diff options
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/dropdown')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt b/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt index 0f653d30..1370f25a 100644 --- a/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt +++ b/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt @@ -70,11 +70,7 @@ open class DropDown( set(value) { button.text = value } - private var elements = elements - set(value) { - field = value - setChildrenFromElements() - } + private var elements by refreshOnUpdate(elements, { setChildrenFromElements() }) /** * The icon of the dropdown button. */ @@ -126,11 +122,7 @@ open class DropDown( /** * Determines if the dropdown is showing upwards. */ - var dropup = false - set(value) { - field = value - refresh() - } + var dropup by refreshOnUpdate(false) /** * Width of the dropdown button. */ |