diff options
author | Robert Jaros <rjaros@finn.pl> | 2017-09-30 12:50:04 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2017-09-30 12:50:04 +0200 |
commit | ef4d83ee13289761a014f884ee83688038e7b497 (patch) | |
tree | 7cf00eba1327898660584285c814aef4226c3ae7 /src/main/kotlin/pl/treksoft/kvision/tabs | |
parent | 4a62542e4dcc47c337885c74704500b67c15d02d (diff) | |
download | kvision-ef4d83ee13289761a014f884ee83688038e7b497.tar.gz kvision-ef4d83ee13289761a014f884ee83688038e7b497.tar.bz2 kvision-ef4d83ee13289761a014f884ee83688038e7b497.zip |
Unit tests
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/tabs')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/tabs/Tabs.kt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/tabs/Tabs.kt b/src/main/kotlin/pl/treksoft/kvision/tabs/Tabs.kt index b21b1713..773f341a 100644 --- a/src/main/kotlin/pl/treksoft/kvision/tabs/Tabs.kt +++ b/src/main/kotlin/pl/treksoft/kvision/tabs/Tabs.kt @@ -11,7 +11,7 @@ import pl.treksoft.kvision.panel.StackPanel open class Tabs : Container(setOf()) { private var nav = Tag(TAG.UL, classes = setOf("nav", "nav-tabs")) private var content = StackPanel(false) - private var activeIndex + var activeIndex get() = content.activeIndex set(value) { content.activeIndex = value @@ -47,4 +47,10 @@ open class Tabs : Container(setOf()) { return this } + open fun removeTab(index: Int): Tabs { + nav.removeAt(index) + content.removeAt(index) + activeIndex = content.activeIndex + return this + } } |