@@ -8,6 +8,7 @@ import { VAvatar } from '@/components/VAvatar'
88import { VChipGroupSymbol } from '@/components/VChipGroup/VChipGroup'
99import { VDefaultsProvider } from '@/components/VDefaultsProvider'
1010import { VIcon } from '@/components/VIcon'
11+ import { VSlideGroupSymbol } from '@/components/VSlideGroup/VSlideGroup'
1112
1213// Composables
1314import { makeBorderProps , useBorder } from '@/composables/border'
@@ -29,7 +30,7 @@ import { genOverlays, makeVariantProps, useVariant } from '@/composables/variant
2930import vRipple from '@/directives/ripple'
3031
3132// Utilities
32- import { computed , toDisplayString , toRef } from 'vue'
33+ import { computed , toDisplayString , toRef , watch } from 'vue'
3334import { EventProp , genericComponent , propsFactory } from '@/util'
3435
3536// Types
@@ -133,7 +134,10 @@ export const VChip = genericComponent<VChipSlots>()({
133134 const { themeClasses } = provideTheme ( props )
134135
135136 const isActive = useProxiedModel ( props , 'modelValue' )
137+
136138 const group = useGroupItem ( props , VChipGroupSymbol , false )
139+ const slideGroup = useGroupItem ( props , VSlideGroupSymbol , false )
140+
137141 const link = useLink ( props , attrs )
138142 const isLink = toRef ( ( ) => props . link !== false && link . isLink . value )
139143 const isClickable = computed ( ( ) =>
@@ -154,6 +158,16 @@ export const VChip = genericComponent<VChipSlots>()({
154158 } ,
155159 } ) )
156160
161+ watch ( isActive , val => {
162+ if ( val ) {
163+ group ?. register ( )
164+ slideGroup ?. register ( )
165+ } else {
166+ group ?. unregister ( )
167+ slideGroup ?. unregister ( )
168+ }
169+ } )
170+
157171 const { colorClasses, colorStyles, variantClasses } = useVariant ( ( ) => {
158172 const showColor = ! group || group . isSelected . value
159173 return ( {
0 commit comments