Skip to content

Commit d8932d1

Browse files
author
Guillaume Chau
committed
More docs
1 parent df19ba0 commit d8932d1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ It's very similar to virtual-scroller, but:
358358
- Recycles scoped slot content (including components) in the list (no destroyed components), depending on item types (customize with `typeField` prop)
359359
- The components used in the list should expect `item` prop change without being re-created (use computed props or watchers to properly react to props changes!)
360360
- You don't need to set `key` on list content (but you should on `<img>` elements)
361+
- You get a `active` prop in the scoped slot, that is `false` when the view isn't currently rendered (but could be reused later).
361362
- To emulate conditions that would otherwise be available in a `v-for` loop, the scoped slot exposes an `index` prop that reflects each item's position in the `items` array
362363

363364
Both fixed and dynamic height modes are supported (set `itemHeight` prop for fixed height mode).
@@ -368,7 +369,7 @@ Both fixed and dynamic height modes are supported (set `itemHeight` prop for fix
368369
:items="items"
369370
>
370371
<!-- For each item -->
371-
<template slot-scope="{ item, index }">
372+
<template slot-scope="{ item, index, active }">
372373
<!-- Reactive dynamic height -->
373374
<div
374375
v-if="item.type === 'letter'"
@@ -383,6 +384,7 @@ Both fixed and dynamic height modes are supported (set `itemHeight` prop for fix
383384
v-else-if="item.type === 'person'"
384385
:data="item.value"
385386
:index="index"
387+
:active="active"
386388
/>
387389
</template>
388390
</recycle-list>

0 commit comments

Comments
 (0)