aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2020-06-02 23:32:40 +0200
committerRobert Jaros <rjaros@finn.pl>2020-06-02 23:32:40 +0200
commit769eb4cb7f44832b9e8ba48c84d900e13f06c851 (patch)
treeb956936d504ca38f7ede387f6c696f01334e2961 /src/main
parent054a2b9faec6da1b179d553cff1676e073415100 (diff)
downloadkvision-769eb4cb7f44832b9e8ba48c84d900e13f06c851.tar.gz
kvision-769eb4cb7f44832b9e8ba48c84d900e13f06c851.tar.bz2
kvision-769eb4cb7f44832b9e8ba48c84d900e13f06c851.zip
Fix hooks calling order (#156)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/core/Widget.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt b/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt
index b28943dd..72c5699c 100644
--- a/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt
@@ -326,10 +326,12 @@ open class Widget(classes: Set<String> = setOf()) : StyledComponent(), Component
vnode = v
afterInsertInternal(v)
afterInsert(v)
+ afterInsertHook?.invoke(v)
}
destroy = {
afterDestroyInternal()
afterDestroy()
+ afterDestroyHook?.invoke()
vnode = null
vnode
}
@@ -806,7 +808,6 @@ open class Widget(classes: Set<String> = setOf()) : StyledComponent(), Component
content = it.content?.let { translate(it) }).toJs()
)
}
- this.afterInsertHook?.invoke(node)
}
/**
@@ -828,7 +829,6 @@ open class Widget(classes: Set<String> = setOf()) : StyledComponent(), Component
val popoverFun = getElementJQueryD()?.popover
if (popoverFun != undefined) getElementJQueryD()?.popover("dispose")
}
- this.afterDestroyHook?.invoke()
}
/**