Skip to content

Commit

Permalink
fix(VStepper): accept null value for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed May 28, 2024
1 parent e94dc93 commit 908fb59
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/vuetify/src/components/VStepper/VStepper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { makeVSheetProps, VSheet } from '@/components/VSheet/VSheet'

// Composables
import { provideDefaults } from '@/composables/defaults'
import { makeDisplayProps, useDisplay } from '@/composables/display'
import { makeGroupProps, useGroup } from '@/composables/group'

// Utilities
Expand Down Expand Up @@ -61,9 +62,10 @@ export const makeStepperProps = propsFactory({
type: String,
default: 'value',
},
mobile: Boolean,
nonLinear: Boolean,
flat: Boolean,

...makeDisplayProps(),
}, 'Stepper')

export const makeVStepperProps = propsFactory({
Expand All @@ -87,6 +89,7 @@ export const VStepper = genericComponent<VStepperSlots>()({

setup (props, { slots }) {
const { items: _items, next, prev, selected } = useGroup(props, VStepperSymbol)
const { displayClasses, mobile } = useDisplay(props)
const { color, editable, prevText, nextText } = toRefs(props)

const items = computed(() => props.items.map((item, index) => {
Expand Down Expand Up @@ -141,8 +144,9 @@ export const VStepper = genericComponent<VStepperSlots>()({
'v-stepper--alt-labels': props.altLabels,
'v-stepper--flat': props.flat,
'v-stepper--non-linear': props.nonLinear,
'v-stepper--mobile': props.mobile,
'v-stepper--mobile': mobile.value,
},
displayClasses.value,
props.class,
]}
style={ props.style }
Expand Down

0 comments on commit 908fb59

Please sign in to comment.