on develop help sign in
Fix virtualList height calculation
commitaebb0fe483c27467ba9cb3af6ea5468190f19e1b authorAli Abrar <aliabrar@gmail.com> dateThu 20 Apr 2017, 18:33 (10 years ago) parentc9328bf
1 file changed+1−1
src/Reflex/Dom/Widget/Lazy.hs+1−1
src/Reflex/Dom/Widget/Lazy.hs+1−1
@@ -92,7 +92,7 @@ virtualList :: forall t m k v a. (DomBuilder t m, PostBuild t m, MonadHold t m,
9292 -> (k -> v -> Event t v -> m a) -- ^ The row child element builder.
9393 -> m (Dynamic t (Int, Int), Dynamic t (Map k a)) -- ^ A tuple containing: a 'Dynamic' of the index (based on the current scroll position) and number of items currently being rendered, and the 'Dynamic' list result
9494virtualList heightPx rowPx maxIndex i0 setI keyToIndex items0 itemsUpdate itemBuilder = do
95− let virtualH = fmap (mkVirtualHeight . (*) rowPx) maxIndex
95+ let virtualH = mkVirtualHeight <$> maxIndex
9696 containerStyle = fmap mkContainer heightPx
9797 viewportStyle = fmap mkViewport heightPx
9898 pb <- getPostBuild