Skip to content

Commit

Permalink
fix(VBottomNavigation): remove internal translate and fix active/mode…
Browse files Browse the repository at this point in the history
…lValue
  • Loading branch information
johnleider committed Apr 11, 2024
1 parent 0cd9e54 commit 54e33b6
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ export const makeVBottomNavigationProps = propsFactory({
...makeRoundedProps(),
...makeLayoutItemProps({ name: 'bottom-navigation' }),
...makeTagProps({ tag: 'header' }),
...makeGroupProps({
modelValue: true,
selectedClass: 'v-btn--selected',
}),
...makeGroupProps({ selectedClass: 'v-btn--selected' }),
...makeThemeProps(),
}, 'VBottomNavigation')

Expand All @@ -70,6 +67,7 @@ export const VBottomNavigation = genericComponent<new <T>(
props: makeVBottomNavigationProps(),

emits: {
'update:active': (value: any) => true,
'update:modelValue': (value: any) => true,
},

Expand All @@ -86,7 +84,7 @@ export const VBottomNavigation = genericComponent<new <T>(
(props.density === 'comfortable' ? 8 : 0) -
(props.density === 'compact' ? 16 : 0)
))
const isActive = useProxiedModel(props, 'modelValue', props.modelValue)
const isActive = useProxiedModel(props, 'active', props.active)
const { layoutItemStyles, layoutIsReady } = useLayoutItem({
id: props.name,
order: computed(() => parseInt(props.order, 10)),
Expand Down Expand Up @@ -132,7 +130,6 @@ export const VBottomNavigation = genericComponent<new <T>(
layoutItemStyles.value,
{
height: convertToUnit(height.value),
transform: `translateY(${convertToUnit(!isActive.value ? 100 : 0, '%')})`,
},
ssrBootStyles.value,
props.style,
Expand Down

0 comments on commit 54e33b6

Please sign in to comment.