on develop help sign in
Use holdUniqDyn instead of uniqDyn
38e2617Ryan Trinkle
reflex-dom-core/src/Reflex/Dom/Builder/Immediate.hs+2−1
@@ -504,9 +504,10 @@ instance SupportsImmediateDomBuilder t m => DomBuilder t (ImmediateDomBuilderT t
504 mfiles <- Input.getFiles domInputElement
504 mfiles <- Input.getFiles domInputElement
505 let getMyFiles xs = fmap catMaybes . mapM (FileList.item xs) . flip take [0..] . fromIntegral =<< FileList.getLength xs
505 let getMyFiles xs = fmap catMaybes . mapM (FileList.item xs) . flip take [0..] . fromIntegral =<< FileList.getLength xs
506 maybe (return []) getMyFiles mfiles
506 maybe (return []) getMyFiles mfiles
507+ checked <- holdUniqDyn c
507 return $ InputElement
508 return $ InputElement
508 { _inputElement_value = v
509 { _inputElement_value = v
509− , _inputElement_checked = uniqDyn c
510+ , _inputElement_checked = checked
510 , _inputElement_checkedChange = checkedChangedByUI
511 , _inputElement_checkedChange = checkedChangedByUI
511 , _inputElement_input = valueChangedByUI
512 , _inputElement_input = valueChangedByUI
512 , _inputElement_hasFocus = hasFocus
513 , _inputElement_hasFocus = hasFocus
reflex-dom-core/src/Reflex/Dom/Widget/Lazy.hs+2−1
@@ -104,7 +104,8 @@ virtualList heightPx rowPx maxIndex i0 setI keyToIndex items0 itemsUpdate itemBu
104 let window = zipDynWith (findWindow rowPx) heightPx scrollPosition
104 let window = zipDynWith (findWindow rowPx) heightPx scrollPosition
105 performEvent_ $ ffor (leftmost [setI, i0 <$ pb]) $ \i ->
105 performEvent_ $ ffor (leftmost [setI, i0 <$ pb]) $ \i ->
106 setScrollTop (_element_raw viewport) (i * rowPx)
106 setScrollTop (_element_raw viewport) (i * rowPx)
107+ uniqWindow <- holdUniqDyn window
107− return (uniqDyn window, result)
108+ return (uniqWindow, result)
108 where
109 where
109 toStyleAttr m = "style" =: Map.foldWithKey (\k v s -> k <> ":" <> v <> ";" <> s) "" m
110 toStyleAttr m = "style" =: Map.foldWithKey (\k v s -> k <> ":" <> v <> ";" <> s) "" m
110 mkViewport h = toStyleAttr $ "overflow" =: "auto" <> "position" =: "absolute" <>
111 mkViewport h = toStyleAttr $ "overflow" =: "auto" <> "position" =: "absolute" <>