Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync upstream #877

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ When the user scrolls inside RecycleScroller, the views are mostly just moved ar
- `prerender` (default: `0`): render a fixed number of items for Server-Side Rendering (SSR).
- `buffer` (default: `200`): amount of pixel to add to edges of the scrolling visible area to start rendering items further away.
- `emitUpdate` (default: `false`): emit a `'update'` event each time the virtual scroller content is updated (can impact performance).
- `detectHover` (default: `true`): whether listen for `'mouseenter'` and `'mouseleave'` events and apply the `hover` class as a result

### Events

Expand Down
50 changes: 29 additions & 21 deletions dist/vue-virtual-scroller.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/vue-virtual-scroller.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-virtual-scroller.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-virtual-scroller.min.js.map

Large diffs are not rendered by default.

50 changes: 29 additions & 21 deletions dist/vue-virtual-scroller.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/vue-virtual-scroller.umd.js.map

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions src/components/RecycleScroller.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
:style="ready ? { transform: `translate${direction === 'vertical' ? 'Y' : 'X'}(${view.position}px)` } : null"
class="vue-recycle-scroller__item-view"
:class="{ hover: hoverKey === view.nr.key }"
@mouseenter="hoverKey = view.nr.key"
@mouseleave="hoverKey = null"
v-on="detectHover ? { mouseenter: () => hoverKey = view.nr.key, mouseleave: () => hoverKey = null } : {}"
>
<slot
:item="view.item"
Expand Down Expand Up @@ -116,6 +115,11 @@ export default {
type: Boolean,
default: false,
},

detectHover: {
type: Boolean,
default: true,
},
},

data () {
Expand Down
Loading