diff options
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/state')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/state/StateBinding.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/state/StateBinding.kt b/src/main/kotlin/pl/treksoft/kvision/state/StateBinding.kt index 6c8090b7..457af0e4 100644 --- a/src/main/kotlin/pl/treksoft/kvision/state/StateBinding.kt +++ b/src/main/kotlin/pl/treksoft/kvision/state/StateBinding.kt @@ -13,13 +13,15 @@ import pl.treksoft.kvision.core.Widget.Companion.bindState * @param S the state type * @param W the widget type * @param observableState the state + * @param removeChildren remove all children of the component * @param factory a function which re-creates the view based on the given state */ fun <S, W : Widget> W.bind( observableState: ObservableState<S>, + removeChildren: Boolean = true, factory: (W.(S) -> Unit) ): W { - return this.bindState(observableState, factory) + return this.bindState(observableState, removeChildren, factory) } /** |