From 2c2f84b8709d25b342284f637b13d421980d0cb5 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Wed, 31 Jan 2018 08:37:59 -0800 Subject: [PATCH] itemHeights should be divided by realm --- .../virtualList/VirtualListFooter.html | 2 +- .../virtualList/VirtualListItem.html | 4 +- .../virtualList/virtualListStore.js | 37 ++--------------- routes/_utils/RealmStore.js | 40 +++++++++++++++++++ 4 files changed, 46 insertions(+), 37 deletions(-) diff --git a/routes/_components/virtualList/VirtualListFooter.html b/routes/_components/virtualList/VirtualListFooter.html index c1d8366..8ad93a0 100644 --- a/routes/_components/virtualList/VirtualListFooter.html +++ b/routes/_components/virtualList/VirtualListFooter.html @@ -19,7 +19,7 @@ const asyncLayout = new AsyncLayout(() => '__footer__') asyncLayout.observe('__footer__', this.refs.node, (rect) => { asyncLayout.disconnect() - this.store.set({footerHeight: rect.height}) + this.store.setForRealm({footerHeight: rect.height}) }) }, store: () => virtualListStore, diff --git a/routes/_components/virtualList/VirtualListItem.html b/routes/_components/virtualList/VirtualListItem.html index ed40f1d..ecde2ab 100644 --- a/routes/_components/virtualList/VirtualListItem.html +++ b/routes/_components/virtualList/VirtualListItem.html @@ -5,7 +5,7 @@ <:Component {component} virtualProps="{{props}}" virtualIndex="{{index}}" - virtualLength="{{$numItems}}" + virtualLength="{{numItems}}" on:recalculateHeight="doRecalculateHeight()"/>