diff options
author | Robert Jaros <rjaros@finn.pl> | 2017-09-25 09:49:27 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2017-09-25 09:49:27 +0200 |
commit | 726a42ad5643840f84c289c9a6b56d6c3c9067b4 (patch) | |
tree | 61651f82b57adeb635712dca804264584d8371f1 /src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt | |
parent | e212e923e18b80d503f53271d6ba534e17b31e23 (diff) | |
download | kvision-726a42ad5643840f84c289c9a6b56d6c3c9067b4.tar.gz kvision-726a42ad5643840f84c289c9a6b56d6c3c9067b4.tar.bz2 kvision-726a42ad5643840f84c289c9a6b56d6c3c9067b4.zip |
Support for SplitPanel drag and dragEnd events
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt b/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt index 8cc7eaf6..780cc4e3 100644 --- a/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt +++ b/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt @@ -134,21 +134,17 @@ open class DropDown(text: String, elements: List<StringPair>? = null, icon: Stri @Suppress("UnsafeCastFromDynamic") override fun afterInsert(node: VNode) { this.getElementJQuery()?.on("show.bs.dropdown", { e, _ -> - val event = CustomEvent("showBsDropdown", obj({ detail = e })) - this.getElement()?.dispatchEvent(event) + this.dispatchEvent("showBsDropdown", obj({ detail = e })) }) this.getElementJQuery()?.on("shown.bs.dropdown", { e, _ -> - val event = CustomEvent("shownBsDropdown", obj({ detail = e })) - this.getElement()?.dispatchEvent(event) + this.dispatchEvent("shownBsDropdown", obj({ detail = e })) }) this.getElementJQuery()?.on("hide.bs.dropdown", { e, _ -> - val event = CustomEvent("hideBsDropdown", obj({ detail = e })) - this.getElement()?.dispatchEvent(event) + this.dispatchEvent("hideBsDropdown", obj({ detail = e })) }) this.getElementJQuery()?.on("hidden.bs.dropdown", { e, _ -> list.visible = false - val event = CustomEvent("hiddenBsDropdown", obj({ detail = e })) - this.getElement()?.dispatchEvent(event) + this.dispatchEvent("hiddenBsDropdown", obj({ detail = e })) }) } |