vuetifyjs / vuetify

🐉 Vue Component Framework
https://vuetifyjs.com
MIT License
39.06k stars 6.91k forks source link

fix(VHover): false isHovering by default #19623

Closed vkrms closed 1 day ago

vkrms commented 2 weeks ago

Description

fixes #19601

Markup:

<template>
  <v-app>
    <v-container>
      <v-hover>
        <template #default="{ isHovering, props }">
          <v-badge :model-value="isHovering" content="visible on hover">
            <v-chip :label="true" class="mr-1" size="small" v-bind="props">
              {{ isHovering }}
              <span class="font-weight-bold"> Hover Over Me </span>
            </v-chip>
          </v-badge>
        </template>
      </v-hover>
    </v-container>
  </v-app>
</template>
johnleider commented 1 week ago

From @KaelWD's comment, should this be null as default?

https://github.com/vuetifyjs/vuetify/issues/19601#issuecomment-2052964555

vkrms commented 1 week ago

From @KaelWD's comment, should this be null as default?

#19601 (comment)

Yeah I guess it should work better if someone wants to check for an element being untouched. I've introduced the fix, please check.

vkrms commented 2 days ago

@KaelWD Yeah you're right. I had to mess with other components to make typescript happy. Please review. I'm not sure the failing cypress test has anything to do with the fix. I'm diggin into it but it does not make any sense at the moment.