diff options
author | Robert Jaros <rjaros@finn.pl> | 2017-09-23 19:41:48 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2017-09-23 19:41:48 +0200 |
commit | 659b87f5c1c297c68b125f67bc0b29b547debfd0 (patch) | |
tree | aacbd72815cb23568ebed0f0bf7cde60af9a79b8 /src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt | |
parent | 1d96f6e5b45a7eb7b91bcb79bcb9684980317821 (diff) | |
download | kvision-659b87f5c1c297c68b125f67bc0b29b547debfd0.tar.gz kvision-659b87f5c1c297c68b125f67bc0b29b547debfd0.tar.bz2 kvision-659b87f5c1c297c68b125f67bc0b29b547debfd0.zip |
Composable components methods
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt | 10 |
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) { |