From 7fe158d0f2243c460c4f1848bb7989c559362cdf Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 10 Jul 2019 18:07:50 +0200 Subject: Support data tree (#60) --- .../main/kotlin/pl/treksoft/kvision/tabulator/Options.kt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'kvision-modules/kvision-tabulator/src') 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( 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) -> Unit)? = null, @@ -774,6 +782,14 @@ fun TabulatorOptions.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 -- cgit