@@ -74,7 +74,7 @@ listWithKey' = listWithKeyShallowDiff
7474listWithKeyShallowDiff :: (Ord k, Adjustable t m, MonadFix m, MonadHold t m) => Map k v -> Event t (Map k (Maybe v)) -> (k -> v -> Event t v -> m a) -> m (Dynamic t (Map k a))
7575listWithKeyShallowDiff initialVals valsChanged mkChild = do
7676 let childValChangedSelector = fanMap $ fmap (Map.mapMaybe id) valsChanged
77− sentVals <- foldDyn applyMap Map.empty $ fmap (fmap void) valsChanged
77+ sentVals <- foldDyn applyMap (void initialVals) $ fmap (fmap void) valsChanged
7878 let relevantPatch patch _ = case patch of
7979 Nothing -> Just Nothing -- Even if we let a Nothing through when the element doesn't already exist, this doesn't cause a problem because it is ignored
8080 Just _ -> Nothing -- We don't want to let spurious re-creations of items through