Skip to content

Commit 50b6f38

Browse files
ItsPierrejohannes-huther
authored andcommitted
fix: fix endless loop in on reload CPrimaryTabs
Fixes #125
1 parent 384b7ad commit 50b6f38

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

src/components/CPrimaryTabs.vue

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
<template>
2-
<v-tabs
3-
class="c-primary-tabs full-width"
4-
:align-tabs="alignTabs"
5-
:center-active="centerActive"
6-
:show-arrows="showArrows"
7-
>
8-
<slot></slot>
9-
</v-tabs>
2+
<!-- This wrapping div is required to prevent an endless loop when reloading the page. See #125 -->
3+
<div class="w-100">
4+
<v-tabs
5+
class="c-primary-tabs full-width"
6+
:align-tabs="alignTabs"
7+
:center-active="centerActive"
8+
:show-arrows="showArrows"
9+
:style="{ '--tabHeight': tabHeight }"
10+
>
11+
<slot></slot>
12+
</v-tabs>
13+
</div>
1014
</template>
1115

1216
<script setup lang="ts">
@@ -73,10 +77,10 @@ const tabHeight = computed(() => {
7377
}
7478
}
7579
76-
// Custom height
77-
height: v-bind(tabHeight);
80+
// Set height of tab-bar and tabs
81+
&,
7882
.v-tab.v-tab.v-btn {
79-
height: v-bind(tabHeight);
83+
height: var(--tabHeight);
8084
}
8185
}
8286
</style>

0 commit comments

Comments
 (0)