diff options
Diffstat (limited to 'src/main/kotlin/pl/treksoft')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/core/Widget.kt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt b/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt index 414356ce..2b2c7ef1 100644 --- a/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt +++ b/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt @@ -783,10 +783,13 @@ open class Widget(classes: Set<String> = setOf()) : StyledComponent(), Component override fun dispose() { } - protected fun <T> refreshOnUpdate(refreshFunction: ((T) -> Unit) = { this.refresh() }) = - RefreshDelegateProvider<T>(null, refreshFunction) + protected fun <T> refreshOnUpdate(refreshFunction: ((T) -> Unit) = { this.refresh() }): RefreshDelegateProvider<T> = + RefreshDelegateProvider(null, refreshFunction) - protected fun <T> refreshOnUpdate(initialValue: T, refreshFunction: ((T) -> Unit) = { this.refresh() }) = + protected fun <T> refreshOnUpdate( + initialValue: T, + refreshFunction: ((T) -> Unit) = { this.refresh() } + ): RefreshDelegateProvider<T> = RefreshDelegateProvider(initialValue, refreshFunction) protected inner class RefreshDelegateProvider<T>( |