aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/dropdown
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2017-09-23 19:41:48 +0200
committerRobert Jaros <rjaros@finn.pl>2017-09-23 19:41:48 +0200
commit659b87f5c1c297c68b125f67bc0b29b547debfd0 (patch)
treeaacbd72815cb23568ebed0f0bf7cde60af9a79b8 /src/main/kotlin/pl/treksoft/kvision/dropdown
parent1d96f6e5b45a7eb7b91bcb79bcb9684980317821 (diff)
downloadkvision-659b87f5c1c297c68b125f67bc0b29b547debfd0.tar.gz
kvision-659b87f5c1c297c68b125f67bc0b29b547debfd0.tar.bz2
kvision-659b87f5c1c297c68b125f67bc0b29b547debfd0.zip
Composable components methods
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/dropdown')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt b/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt
index 00e8fd9b..eb7a0b50 100644
--- a/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt
@@ -96,12 +96,14 @@ open class DropDown(text: String, elements: List<StringPair>? = null, icon: Stri
var counter = 0
}
- override fun add(child: Widget) {
+ override fun add(child: Widget): Container {
list.add(child)
+ return this
}
- override fun addAll(children: List<Widget>) {
+ override fun addAll(children: List<Widget>): Container {
list.addAll(children)
+ return this
}
private fun setChildrenFromElements() {
@@ -189,9 +191,9 @@ open class DropDownListTag(private val ariaId: String, classes: Set<String> = se
return super.getSnAttrs() + listOf("aria-labelledby" to ariaId)
}
- override fun hide() {
+ override fun hide(): Widget {
if (visible) hideInternal()
- super.hide()
+ return super.hide()
}
override fun afterInsert(node: VNode) {