diff options
author | 2009-09-17 19:15:10 -0400 | |
---|---|---|
committer | 2009-09-17 19:15:10 -0400 | |
commit | 98bb7c3dffffb3a8b5d4f66fd919189004e22949 (patch) | |
tree | 43fabaf463b021f4e60ee562ba4a4a2da786682b | |
parent | e5e468f67bf1442ad295681039ce31e17931ba5d (diff) |
Pseudo-sort working with filters
-rw-r--r-- | demo/more/dlist.ur | 6 | ||||
-rw-r--r-- | demo/more/grid.ur | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/demo/more/dlist.ur b/demo/more/dlist.ur index 02286965..3d2cb49e 100644 --- a/demo/more/dlist.ur +++ b/demo/more/dlist.ur @@ -162,8 +162,12 @@ fun render [ctx] [ctx ~ body] [t] f (r : {Filter : t -> signal bool, None => headPos dl | Some prev => tailPos prev tl tlTop in + b <- r.Filter v; tl' <- signal tl; - listOut (Some tl) tl' ((v, pos) :: acc) + listOut (Some tl) tl' (if b then + (v, pos) :: acc + else + acc) end in listOut None hd [] diff --git a/demo/more/grid.ur b/demo/more/grid.ur index a4157991..333e12a2 100644 --- a/demo/more/grid.ur +++ b/demo/more/grid.ur @@ -218,7 +218,7 @@ functor Make(M : sig return (previous && this)) (fn _ => return True) [_] M.folder M.cols grid.Cols grid.Filters row, - Sort = return (Some (fn _ _ => return False))} + Sort = return (Some (fn _ _ => return True))} grid.Rows} <dyn signal={rows <- Dlist.foldl (fn row => Monad.mapR2 [aggregateMeta M.row] [id] [id] |