From 0ecf48297c01024c108f0cbb8b401250bdfaf44a Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 19 Sep 2009 10:56:09 -0400 Subject: Hopefully fixed Jscomp bug that was breaking Grid --- demo/more/grid.ur | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'demo') diff --git a/demo/more/grid.ur b/demo/more/grid.ur index 333e12a2..829fead0 100644 --- a/demo/more/grid.ur +++ b/demo/more/grid.ur @@ -57,7 +57,8 @@ functor Make(M : sig Updating : source bool, Selected : source bool}, Selection : source bool, - Filters : $(map thd3 M.cols)} + Filters : $(map thd3 M.cols), + Sort : source (option (M.row -> M.row -> bool))} fun newRow cols row = rowS <- source row; @@ -86,11 +87,13 @@ functor Make(M : sig rows <- Dlist.create; sel <- source False; + sort <- source None; return {Cols = cols, Rows = rows, Selection = sel, - Filters = filters} + Filters = filters, + Sort = sort} fun sync {Cols = cols, Rows = rows, ...} = Dlist.clear rows; @@ -218,7 +221,10 @@ functor Make(M : sig return (previous && this)) (fn _ => return True) [_] M.folder M.cols grid.Cols grid.Filters row, - Sort = return (Some (fn _ _ => return True))} + Sort = f <- signal grid.Sort; + return (Option.mp (fn f r1 r2 => r1 <- signal r1.Row; + r2 <- signal r2.Row; + return (f r1 r2)) f)} grid.Rows} Monad.mapR2 [aggregateMeta M.row] [id] [id] -- cgit v1.2.3