aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-tabulator/src
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-07-10 18:07:50 +0200
committerRobert Jaros <rjaros@finn.pl>2019-07-10 18:07:50 +0200
commit7fe158d0f2243c460c4f1848bb7989c559362cdf (patch)
treeaa9ef1f3349abb79e62b34ecbeaaa86e23b9682f /kvision-modules/kvision-tabulator/src
parentf6f69f78b2960ae087e4ad55479a27b805a5b46c (diff)
downloadkvision-7fe158d0f2243c460c4f1848bb7989c559362cdf.tar.gz
kvision-7fe158d0f2243c460c4f1848bb7989c559362cdf.tar.bz2
kvision-7fe158d0f2243c460c4f1848bb7989c559362cdf.zip
Support data tree (#60)
Diffstat (limited to 'kvision-modules/kvision-tabulator/src')
-rw-r--r--kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Options.kt16
1 files changed, 16 insertions, 0 deletions
diff --git a/kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Options.kt b/kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Options.kt
index 251c2f92..416148e3 100644
--- a/kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Options.kt
+++ b/kvision-modules/kvision-tabulator/src/main/kotlin/pl/treksoft/kvision/tabulator/Options.kt
@@ -596,6 +596,14 @@ data class TabulatorOptions<T : Any>(
val locale: String? = null,
var langs: dynamic = null,
val localized: ((locale: String, lang: dynamic) -> Unit)? = null,
+ val dataTree: Boolean? = null,
+ val dataTreeChildField: String? = null,
+ val dataTreeCollapseElement: dynamic = null,
+ val dataTreeExpandElement: dynamic = null,
+ val dataTreeElementColumn: String? = null,
+ val dataTreeBranchElement: dynamic = null,
+ val dataTreeChildIndent: Number? = null,
+ val dataTreeStartExpanded: ((row: Tabulator.RowComponent, level: Number) -> Boolean)? = null,
val dataTreeRowExpanded: ((row: Tabulator.RowComponent, level: Number) -> Unit)? = null,
val dataTreeRowCollapsed: ((row: Tabulator.RowComponent, level: Number) -> Unit)? = null,
val movableRowsSendingStart: ((toTables: Array<Any>) -> Unit)? = null,
@@ -774,6 +782,14 @@ fun <T : Any> TabulatorOptions<T>.toJs(
if (locale != null) this.locale = locale
if (langs != null) this.langs = langs
if (localized != null) this.localized = localized
+ if (dataTree != null) this.dataTree = dataTree
+ if (dataTreeChildField != null) this.dataTreeChildField = dataTreeChildField
+ if (dataTreeCollapseElement != null) this.dataTreeCollapseElement = dataTreeCollapseElement
+ if (dataTreeExpandElement != null) this.dataTreeExpandElement = dataTreeExpandElement
+ if (dataTreeElementColumn != null) this.dataTreeElementColumn = dataTreeElementColumn
+ if (dataTreeBranchElement != null) this.dataTreeBranchElement = dataTreeBranchElement
+ if (dataTreeChildIndent != null) this.dataTreeChildIndent = dataTreeChildIndent
+ if (dataTreeStartExpanded != null) this.dataTreeStartExpanded = dataTreeStartExpanded
if (dataTreeRowExpanded != null) this.dataTreeRowExpanded = dataTreeRowExpanded
if (dataTreeRowCollapsed != null) this.dataTreeRowCollapsed = dataTreeRowCollapsed
if (movableRowsSendingStart != null) this.movableRowsSendingStart = movableRowsSendingStart