forked from cybrespace/pinafore
parent
7ece5d7ffc
commit
3786473e34
|
@ -1,19 +1,17 @@
|
||||||
<div class="pseudo-virtual-list" on:initialized ref:node>
|
<div class="pseudo-virtual-list" on:initialized ref:node>
|
||||||
{{#if wrappedItems}}
|
{{#each wrappedItems as wrappedItem, i @item}}
|
||||||
{{#each wrappedItems as wrappedItem, i @item}}
|
<PseudoVirtualListLazyItem
|
||||||
<PseudoVirtualListLazyItem
|
component="{{component}}"
|
||||||
component="{{component}}"
|
index="{{i}}"
|
||||||
index="{{i}}"
|
length="{{wrappedItems.length}}"
|
||||||
length="{{wrappedItems.length}}"
|
makeProps="{{makeProps}}"
|
||||||
makeProps="{{makeProps}}"
|
key="{{wrappedItem.item}}"
|
||||||
key="{{wrappedItem.item}}"
|
intersectionObserver="{{intersectionObserver}}"
|
||||||
intersectionObserver="{{intersectionObserver}}"
|
isIntersecting="{{isIntersecting(wrappedItem.item, $intersectionStates)}}"
|
||||||
isIntersecting="{{isIntersecting(wrappedItem.item, $intersectionStates)}}"
|
isCached="{{isCached(wrappedItem.item, $intersectionStates)}}"
|
||||||
isCached="{{isCached(wrappedItem.item, $intersectionStates)}}"
|
height="{{getHeight(wrappedItem.item, $intersectionStates)}}"
|
||||||
height="{{getHeight(wrappedItem.item, $intersectionStates)}}"
|
/>
|
||||||
/>
|
{{/each}}
|
||||||
{{/each}}
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
</div>
|
||||||
<style>
|
<style>
|
||||||
.pseudo-virtual-list {
|
.pseudo-virtual-list {
|
||||||
|
@ -107,7 +105,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
wrappedItems: (items) => items && items.map(item => ({item: item})),
|
wrappedItems: (items) => items ? items.map(item => ({item})) : [],
|
||||||
allItemsHaveHeight: (items, $intersectionStates) => {
|
allItemsHaveHeight: (items, $intersectionStates) => {
|
||||||
if (!items) {
|
if (!items) {
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in New Issue