You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -358,6 +358,7 @@ It's very similar to virtual-scroller, but:
358
358
- Recycles scoped slot content (including components) in the list (no destroyed components), depending on item types (customize with `typeField` prop)
359
359
- 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!)
360
360
- 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).
361
362
- 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
362
363
363
364
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
368
369
:items="items"
369
370
>
370
371
<!-- For each item -->
371
-
<templateslot-scope="{ item, index }">
372
+
<templateslot-scope="{ item, index, active }">
372
373
<!-- Reactive dynamic height -->
373
374
<div
374
375
v-if="item.type === 'letter'"
@@ -383,6 +384,7 @@ Both fixed and dynamic height modes are supported (set `itemHeight` prop for fix
0 commit comments