aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2017-09-16 15:35:51 +0200
committerRobert Jaros <rjaros@finn.pl>2017-09-16 15:36:38 +0200
commit6f7435b41e8994821649a50978aeb5b5b65951bd (patch)
treefc5682748802dc1a48954780636ab5d450b1e487 /src/main/kotlin
parent4a7952db63e9bcb0cfc8683327cc772b6e9706d2 (diff)
downloadkvision-6f7435b41e8994821649a50978aeb5b5b65951bd.tar.gz
kvision-6f7435b41e8994821649a50978aeb5b5b65951bd.tar.bz2
kvision-6f7435b41e8994821649a50978aeb5b5b65951bd.zip
Fixed dropdown tests
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/core/Widget.kt7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt b/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt
index 9c6941b7..aaddbe39 100644
--- a/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt
@@ -115,6 +115,10 @@ open class Widget(classes: Set<String> = setOf()) : KVObject {
vnode = v
if (ov.elm !== v.elm) afterInsert(v)
}
+ destroy = { _ ->
+ vnode = null
+ afterDestroy()
+ }
}
return hooks
}
@@ -175,4 +179,7 @@ open class Widget(classes: Set<String> = setOf()) : KVObject {
protected open fun afterInsert(node: VNode) {
}
+
+ protected open fun afterDestroy() {
+ }
}