aboutsummaryrefslogtreecommitdiff
path: root/src/components/tab_switcher/tab_switcher.js
diff options
context:
space:
mode:
authordave <starpumadev@gmail.com>2019-03-03 12:53:01 -0500
committerdave <starpumadev@gmail.com>2019-03-03 12:53:01 -0500
commit3d30ad1dda8f31960586625bb6a432d6b3adde8e (patch)
tree03da669d46e7c3bc5ec8f82a3ad870ff972abc36 /src/components/tab_switcher/tab_switcher.js
parent10711f904508fe2338c354637fd4ebd2e0abb4f0 (diff)
#417: refresh tab on user profile only
Diffstat (limited to 'src/components/tab_switcher/tab_switcher.js')
-rw-r--r--src/components/tab_switcher/tab_switcher.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/components/tab_switcher/tab_switcher.js b/src/components/tab_switcher/tab_switcher.js
index 1de936e8..03da8249 100644
--- a/src/components/tab_switcher/tab_switcher.js
+++ b/src/components/tab_switcher/tab_switcher.js
@@ -4,7 +4,7 @@ import './tab_switcher.scss'
export default Vue.component('tab-switcher', {
name: 'TabSwitcher',
- props: ['renderOnlyFocused'],
+ props: ['refresh', 'renderOnlyFocused'],
data () {
return {
active: this.$slots.default.findIndex(_ => _.tag)
@@ -12,7 +12,9 @@ export default Vue.component('tab-switcher', {
},
watch: {
$route () {
- this.activateTab(0)
+ if (this.refresh) {
+ this.active = 0
+ }
}
},
methods: {