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) { if (intersectionObserver) {
intersectionObserver.disconnect() intersectionObserver.disconnect()
} }
this.store.setCurrentRealm(null)
}, },
helpers: { helpers: {
isIntersecting(key, $intersectionStates) { isIntersecting(key, $intersectionStates) {

View file

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