Skip to content

Commit

Permalink
fix(VSlideGroup): disable prev/next button clicks
Browse files Browse the repository at this point in the history
fixes #18706
  • Loading branch information
KaelWD committed Nov 21, 2023
1 parent 870b091 commit e522e3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vuetify/src/components/VSlideGroup/VSlideGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ export const VSlideGroup = genericComponent<new <T>(
'v-slide-group__prev',
{ 'v-slide-group__prev--disabled': !hasPrev.value },
]}
onClick={ () => scrollTo('prev') }
onClick={ () => hasPrev.value && scrollTo('prev') }
>
{ slots.prev?.(slotProps.value) ?? (
<VFadeTransition>
Expand Down Expand Up @@ -409,7 +409,7 @@ export const VSlideGroup = genericComponent<new <T>(
'v-slide-group__next',
{ 'v-slide-group__next--disabled': !hasNext.value },
]}
onClick={ () => scrollTo('next') }
onClick={ () => hasNext.value && scrollTo('next') }
>
{ slots.next?.(slotProps.value) ?? (
<VFadeTransition>
Expand Down

0 comments on commit e522e3f

Please sign in to comment.