diff options
Diffstat (limited to 'src/main/kotlin/pl/treksoft')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/core/PopupOptions.kt | 4 | ||||
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt | 1 | ||||
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/core/PopupOptions.kt b/src/main/kotlin/pl/treksoft/kvision/core/PopupOptions.kt index c929bea9..0f921f42 100644 --- a/src/main/kotlin/pl/treksoft/kvision/core/PopupOptions.kt +++ b/src/main/kotlin/pl/treksoft/kvision/core/PopupOptions.kt @@ -62,7 +62,7 @@ data class TooltipOptions( * @return JSON object */ fun TooltipOptions.toJs(): dynamic { - val trigger = this.triggers?.map { it.trigger }?.joinToString(" ") + val trigger = this.triggers?.joinToString(" ") { it.trigger } return obj { if (this@toJs.title != null) this.title = this@toJs.title if (this@toJs.rich != null) this.html = this@toJs.rich @@ -93,7 +93,7 @@ data class PopoverOptions( * @return JSON object */ fun PopoverOptions.toJs(): dynamic { - val trigger = this.triggers?.map { it.trigger }?.joinToString(" ") + val trigger = this.triggers?.joinToString(" ") { it.trigger } return obj { if (this@toJs.content != null) this.content = this@toJs.content if (this@toJs.title != null) this.title = this@toJs.title diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt index 5f911539..7f120f73 100644 --- a/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt +++ b/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt @@ -128,6 +128,7 @@ open class Modal( content.add(header) content.add(body) content.add(footer) + @Suppress("LeakingThis") modals.add(this) @Suppress("LeakingThis") init?.invoke(this) diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt index ae8360b5..f620f2b0 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt @@ -160,6 +160,7 @@ open class TabPanel( click = { e -> val actIndex = this@TabPanel.content.children.indexOf(childrenMap[currentIndex]) e.asDynamic().data = actIndex + @Suppress("UnsafeCastFromDynamic") if (this@TabPanel.dispatchEvent( "tabClosing", obj { detail = e; cancelable = true }) != false |