Skip to content

Commit

Permalink
fix(VHover): false isHovering by default (#19623)
Browse files Browse the repository at this point in the history
fixes #19601

Co-authored-by: John Leider <john@vuetifyjs.com>
  • Loading branch information
vkrms and johnleider authored May 1, 2024
1 parent fcc921c commit 75ed37b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/vuetify/src/components/VHover/VHover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { genericComponent, propsFactory } from '@/util'

type VHoverSlots = {
default: {
isHovering: boolean | undefined
isHovering: boolean | null
props: Record<string, unknown>
}
}
Expand All @@ -16,7 +16,7 @@ export const makeVHoverProps = propsFactory({
disabled: Boolean,
modelValue: {
type: Boolean,
default: undefined,
default: null,
},

...makeDelayProps(),
Expand Down
7 changes: 5 additions & 2 deletions packages/vuetify/src/components/VOverlay/VOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ export const makeVOverlayProps = propsFactory({
disabled: Boolean,
opacity: [Number, String],
noClickAnimation: Boolean,
modelValue: Boolean,
modelValue: {
type: Boolean as PropType<boolean | null>,
default: null,
},
persistent: Boolean,
scrim: {
type: [Boolean, String],
Expand Down Expand Up @@ -137,7 +140,7 @@ export const VOverlay = genericComponent<OverlaySlots>()({
setup (props, { slots, attrs, emit }) {
const model = useProxiedModel(props, 'modelValue')
const isActive = computed({
get: () => model.value,
get: () => Boolean(model.value),
set: v => {
if (!(v && props.disabled)) model.value = v
},
Expand Down
2 changes: 1 addition & 1 deletion packages/vuetify/src/components/VSnackbar/VSnackbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import type { Ref } from 'vue'
type VSnackbarSlots = {
activator: { isActive: boolean, props: Record<string, any> }
default: never
actions: { isActive: Ref<boolean> }
actions: { isActive: Ref<boolean | null> }
text: never
}

Expand Down

0 comments on commit 75ed37b

Please sign in to comment.