Skip to content

Commit

Permalink
fix(VSlideGroup): always hide arrows when prop is "never"
Browse files Browse the repository at this point in the history
fixes #14586
  • Loading branch information
bokub committed Jun 20, 2022
1 parent ff519c6 commit 23e4a5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api-generator/src/locale/en/v-slide-group.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"mobileBreakpoint": "Sets the designated mobile breakpoint for the component.",
"nextIcon": "The appended slot when arrows are shown",
"prevIcon": "The prepended slot when arrows are shown",
"showArrows": "Change when the overflow arrow indicators are shown. By **default**, arrows *always* display on Desktop when the container is overflowing. When the container overflows on mobile, arrows are not shown by default. A **show-arrows** value of `true` allows these arrows to show on Mobile if the container overflowing. A value of `desktop` *always* displays arrows on Desktop while a value of `mobile` always displays arrows on Mobile. A value of `always` always displays arrows on Desktop *and* Mobile. Find more information on how to customize breakpoint thresholds on the [breakpoints page](/customizing/breakpoints)."
"showArrows": "Change when the overflow arrow indicators are shown. By **default**, arrows *always* display on Desktop when the container is overflowing. When the container overflows on mobile, arrows are not shown by default. A **show-arrows** value of `true` allows these arrows to show on Mobile if the container overflowing. A value of `desktop` *always* displays arrows on Desktop while a value of `mobile` always displays arrows on Mobile. A value of `always` always displays arrows on Desktop *and* Mobile. A value of `never` always hides the arrows. Find more information on how to customize breakpoint thresholds on the [breakpoints page](/customizing/breakpoints)."
},
"slots": {
"next": "The next slot",
Expand Down
4 changes: 4 additions & 0 deletions packages/vuetify/src/components/VSlideGroup/VSlideGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export const BaseSlideGroup = mixins<options &
validator: v => (
typeof v === 'boolean' || [
'always',
'never',
'desktop',
'mobile',
].includes(v)
Expand Down Expand Up @@ -186,6 +187,9 @@ export const BaseSlideGroup = mixins<options &
(this.isOverflowing || Math.abs(this.scrollOffset) > 0)
)

// Always hide arrows
case 'never': return false

// https://material.io/components/tabs#scrollable-tabs
// Always show arrows when
// overflowed on desktop
Expand Down

0 comments on commit 23e4a5c

Please sign in to comment.