vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Bug Report] lingering v-icon when using v-hover in v-data-table

Open jricke opened this issue 8 years ago • 4 comments

Versions and Environment

Vuetify: 1.3.6 Vue: 2.5.17 Browsers: Edge 17.17134, Google Chrome OS: Windows 10

Steps to reproduce

Hover over first column.

Expected Behavior

Hover over first column should show icon, when leaving the area, the icon should disappear immediately.

Actual Behavior

Icon lingers as if it ignores the v-hover delays

Reproduction Link

https://codepen.io/anon/pen/MzKrpo

jricke avatar Nov 07 '18 22:11 jricke

You could just do the following:

...
<v-hover open-delay="0" close-delay="0">
	<v-layout slot-scope="{ hover }"> 
		<v-flex>
			{{ props.item.name }}
		</v-flex>
		<v-flex v-if="hover" style="position: absolute; left: 300px">
			<v-icon>
				alarm_on
			</v-icon>
		</v-flex>
	</v-layout>
</v-hover>
...

rkomiyama avatar Nov 08 '18 04:11 rkomiyama

This is due to the catch-all transition @johnleider puts on everything: https://github.com/vuetifyjs/vuetify/blob/56c4ab6b77cd68f5ac046ac40ef073af20cf0a47/packages/vuetify/src/stylus/components/_icons.styl#L20

KaelWD avatar Nov 08 '18 05:11 KaelWD

Thank you.

I fixed the issue by overriding the transition via css.

jricke avatar Nov 08 '18 13:11 jricke

I don't think this applies just to data-tables. In my case v-icon nested in a v-btn ( & .v-btn__content ) all need transistion: none in order to remove the delay before the icon is hidden.

.v-btn,
.v-btn__content,
.v-icon {
  transition: none;
}

kynetiv avatar Feb 11 '19 16:02 kynetiv