fix virtual list realm

This commit is contained in:
Nolan Lawson 2018-02-12 22:47:25 -08:00
parent 2db4236761
commit 9a042c5981
2 changed files with 3 additions and 1 deletions

View File

@ -61,6 +61,7 @@
if (intersectionObserver) {
intersectionObserver.disconnect()
}
this.store.setCurrentRealm(null)
},
helpers: {
isIntersecting(key, $intersectionStates) {

View File

@ -10,10 +10,10 @@
export default {
oncreate() {
mark('onCreate VirtualListContainer')
this.store.setCurrentRealm(this.get('realm'))
let node = document.querySelector(this.get('containerQuery'))
this.setupScroll(node)
this.setupFullscreen()
this.store.setCurrentRealm(this.get('realm'))
let scrollTop = this.store.get('scrollTop')
if (scrollTop > 0) {
this.observe('allVisibleItemsHaveHeight', allVisibleItemsHaveHeight => {
@ -39,6 +39,7 @@
ondestroy() {
this.teardownScroll()
this.teardownFullscreen()
this.store.setCurrentRealm(null)
},
store: () => virtualListStore,
methods: {