aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2020-05-09 23:53:57 +0200
committerRobert Jaros <rjaros@finn.pl>2020-05-09 23:53:57 +0200
commit134cb687c4e05fd81a03b682505f9fb9d741a8d7 (patch)
treef9f41f28c01dc29d1d4fdd576cc9b21958fd9c3b /kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision
parent4a2aa49e0e561c1bc25aa962449fa2fcce9207ba (diff)
downloadkvision-134cb687c4e05fd81a03b682505f9fb9d741a8d7.tar.gz
kvision-134cb687c4e05fd81a03b682505f9fb9d741a8d7.tar.bz2
kvision-134cb687c4e05fd81a03b682505f9fb9d741a8d7.zip
Add new className parameter to all DSL builder functions.
Diffstat (limited to 'kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision')
-rw-r--r--kvision-modules/kvision-tabulator-remote/src/main/kotlin/pl/treksoft/kvision/tabulator/TabulatorRemote.kt7
1 files changed, 5 insertions, 2 deletions
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 <T : Any, E : Any> Container.tabulatorRemote(
stateFunction: (() -> String)? = null,
options: TabulatorOptions<T> = TabulatorOptions(),
types: Set<TableType> = setOf(),
- classes: Set<String> = setOf(),
+ classes: Set<String>? = null,
+ className: String? = null,
init: (TabulatorRemote<T, E>.() -> Unit)? = null
): TabulatorRemote<T, E> {
- 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