Skip to content

Commit

Permalink
fix(VTabs): indent tabs on the correct with the right prop
Browse files Browse the repository at this point in the history
fixes #8294
  • Loading branch information
johnleider committed Apr 21, 2020
1 parent ed42480 commit 68a49c3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ exports[`VChipGroup.ts should have a v-chip-group class 1`] = `
<div class="v-slide-group__content">
</div>
</div>
<div class="v-slide-group__next v-slide-group__next--disabled">
</div>
</div>
`;

Expand All @@ -19,6 +21,8 @@ exports[`VChipGroup.ts should render column 1`] = `
<div class="v-slide-group__content">
</div>
</div>
<div class="v-slide-group__next v-slide-group__next--disabled">
</div>
</div>
`;

Expand All @@ -30,6 +34,8 @@ exports[`VChipGroup.ts should switch to column 1`] = `
<div class="v-slide-group__content">
</div>
</div>
<div class="v-slide-group__next v-slide-group__next--disabled">
</div>
</div>
`;

Expand All @@ -41,5 +47,7 @@ exports[`VChipGroup.ts should switch to column 2`] = `
<div class="v-slide-group__content">
</div>
</div>
<div class="v-slide-group__next v-slide-group__next--disabled">
</div>
</div>
`;
3 changes: 1 addition & 2 deletions packages/vuetify/src/components/VSlideGroup/VSlideGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ export const BaseSlideGroup = mixins<options &
},

methods: {
// Always generate next for scrollable hint
genNext (): VNode | null {
if (!this.hasAffixes) return null

const slot = this.$scopedSlots.next
? this.$scopedSlots.next({})
: this.$slots.next || this.__cachedNext
Expand Down
20 changes: 14 additions & 6 deletions packages/vuetify/src/components/VTabs/VTabs.sass
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,25 @@
.v-tab
white-space: normal

// https://github.com/vuetifyjs/vuetify/issues/8294
&.v-tabs--right
> .v-slide-group--is-overflowing.v-tabs-bar--is-mobile:not(.v-tabs-bar--show-arrows):not(.v-slide-group--has-affixes)
.v-slide-group__next
display: initial
visibility: hidden

// https://github.com/vuetifyjs/vuetify/issues/6932
&:not(.v-tabs--right)
> .v-slide-group--is-overflowing.v-tabs-bar--is-mobile:not(.v-tabs-bar--show-arrows):not(.v-slide-group--has-affixes)
.v-slide-group__prev
display: initial
visibility: hidden

// Element
.v-tabs-bar
border-radius: inherit
height: $tabs-bar-height

// https://github.com/vuetifyjs/vuetify/issues/6932
&.v-slide-group--is-overflowing.v-tabs-bar--is-mobile:not(.v-tabs-bar--show-arrows):not(.v-slide-group--has-affixes)
.v-slide-group__prev
display: initial
visibility: hidden

&.v-item-group > *
cursor: initial

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ exports[`VTabs.ts should render generic elements in the tab container 1`] = `
</div>
</div>
</div>
<div class="v-slide-group__next v-slide-group__next--disabled">
</div>
</div>
</div>
`;

0 comments on commit 68a49c3

Please sign in to comment.