Skip to content

Commit

Permalink
fix(VSlideGroup): always hide arrows when prop is false
Browse files Browse the repository at this point in the history
fixes #14586
  • Loading branch information
bokub committed Jan 10, 2022
1 parent 9e2edf3 commit f97a74d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/vuetify/src/components/VSlideGroup/VSlideGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import mixins, { ExtractVue } from '../../util/mixins'
// Types
import Vue, { VNode } from 'vue'
import { composedPath } from '../../util/helpers'
import { PropType } from 'vue/types/options'

interface TouchEvent {
touchstartX: number
Expand Down Expand Up @@ -126,8 +127,10 @@ export const BaseSlideGroup = mixins<options &
default: '$prev',
},
showArrows: {
type: [Boolean, String],
type: [Boolean, String] as PropType<boolean | string | undefined>,
default: undefined,
validator: v => (
v === undefined ||
typeof v === 'boolean' || [
'always',
'desktop',
Expand Down Expand Up @@ -187,6 +190,9 @@ export const BaseSlideGroup = mixins<options &
(this.isOverflowing || Math.abs(this.scrollOffset) > 0)
)

// Always hide arrows
case false: return false

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

0 comments on commit f97a74d

Please sign in to comment.