gitlab-org--gitlab-foss/app/assets/javascripts/vue_shared/components/tabs/tab.vue
Phil Hughes 03820e9b03
fetch both created & assigned
show badges for both

[ci skip]
2018-06-06 11:19:03 +01:00

45 lines
679 B
Vue

<script>
export default {
props: {
title: {
type: String,
required: false,
default: '',
},
active: {
type: Boolean,
required: false,
default: false,
},
},
data() {
return {
// props can't be updated, so we map it to data where we can
localActive: this.active,
};
},
watch: {
active() {
this.localActive = this.active;
},
},
created() {
this.isTab = true;
},
updated() {
this.$parent.$forceUpdate();
},
};
</script>
<template>
<div
class="tab-pane"
:class="{
active: localActive
}"
role="tabpanel"
>
<slot></slot>
</div>
</template>