aboutsummaryrefslogtreecommitdiff
path: root/src/components/tab_switcher/tab_switcher.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/tab_switcher/tab_switcher.js')
-rw-r--r--src/components/tab_switcher/tab_switcher.js15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/components/tab_switcher/tab_switcher.js b/src/components/tab_switcher/tab_switcher.js
index 616f1a19..7891cb78 100644
--- a/src/components/tab_switcher/tab_switcher.js
+++ b/src/components/tab_switcher/tab_switcher.js
@@ -113,23 +113,20 @@ export default Vue.component('tab-switcher', {
if (slot.data.attrs.fullHeight) {
classes.push('full-height')
}
- const newSlot = (
+ const renderSlot = (!this.renderOnlyFocused || active)
+ ? slot
+ : ''
+
+ return (
<div class={classes}>
{
this.sideTabBar
? <h1 class="mobile-label">{slot.data.attrs.label}</h1>
: ''
}
- {slot}
+ {renderSlot}
</div>
)
-
- if (this.renderOnlyFocused) {
- return active
- ? <div class={classes.join(' ')}>{newSlot}</div>
- : <div class={classes.join(' ')}></div>
- }
- return <div class={classes.join(' ')}>{newSlot}</div>
})
return (