From 134cb687c4e05fd81a03b682505f9fb9d741a8d7 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 9 May 2020 23:53:57 +0200 Subject: Add new className parameter to all DSL builder functions. --- .../main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl') diff --git a/kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt b/kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt index c9e8e208..e4473ed8 100644 --- a/kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt +++ b/kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt @@ -34,6 +34,7 @@ import pl.treksoft.kvision.remote.RemoteFilter import pl.treksoft.kvision.remote.RemoteSorter import pl.treksoft.kvision.table.TableType import pl.treksoft.kvision.utils.JSON +import pl.treksoft.kvision.utils.set import kotlin.browser.window /** @@ -114,10 +115,12 @@ fun Container.tabulatorRemote( stateFunction: (() -> String)? = null, options: TabulatorOptions = TabulatorOptions(), types: Set = setOf(), - classes: Set = setOf(), + classes: Set? = null, + className: String? = null, init: (TabulatorRemote.() -> Unit)? = null ): TabulatorRemote { - val tabulatorRemote = TabulatorRemote(serviceManager, function, stateFunction, options, types, classes) + val tabulatorRemote = + TabulatorRemote(serviceManager, function, stateFunction, options, types, classes ?: className.set) init?.invoke(tabulatorRemote) this.add(tabulatorRemote) return tabulatorRemote -- cgit