2018-01-22 00:07:11 +00:00
|
|
|
<div class="virtual-list-footer"
|
|
|
|
ref:node
|
2018-05-02 00:05:36 +00:00
|
|
|
style="transform: translateY({$heightWithoutFooter}px);" >
|
|
|
|
<svelte:component this={component} />
|
2018-01-22 00:07:11 +00:00
|
|
|
</div>
|
|
|
|
<style>
|
|
|
|
.virtual-list-footer {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
2018-01-25 16:23:14 +00:00
|
|
|
import { virtualListStore } from './virtualListStore'
|
2018-04-27 16:21:30 +00:00
|
|
|
import { mark, stop } from '../../_utils/marks'
|
2018-01-22 00:07:11 +00:00
|
|
|
|
|
|
|
export default {
|
2018-04-20 04:38:01 +00:00
|
|
|
oncreate () {
|
2018-04-27 16:21:30 +00:00
|
|
|
requestAnimationFrame(() => {
|
|
|
|
mark('VirtualListFooter gBCR')
|
|
|
|
let rect = this.refs.node.getBoundingClientRect()
|
|
|
|
stop('VirtualListFooter gBCR')
|
2018-01-31 16:37:59 +00:00
|
|
|
this.store.setForRealm({footerHeight: rect.height})
|
2018-01-22 00:07:11 +00:00
|
|
|
})
|
|
|
|
},
|
2018-04-20 04:38:01 +00:00
|
|
|
store: () => virtualListStore
|
2018-01-22 00:07:11 +00:00
|
|
|
}
|
|
|
|
</script>
|