From 5659f2df1e6ea473794075d85f2a43fc1037fce9 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 10 Sep 2020 16:45:16 +0200 Subject: [PATCH] fix(dbtable): calculate height of header correctly Fixes #634 --- src/Handler/Utils/Table/Pagination.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handler/Utils/Table/Pagination.hs b/src/Handler/Utils/Table/Pagination.hs index c0ad787ca..0bba1059d 100644 --- a/src/Handler/Utils/Table/Pagination.hs +++ b/src/Handler/Utils/Table/Pagination.hs @@ -1310,7 +1310,7 @@ dbTable PSValidator{..} dbtable@DBTable{ dbtIdent = dbtIdent'@(toPathPiece -> db wrap' :: Seq (Seq (Widget, Int)) -> Widget wrap' wRows = view _2 $ Foldable.foldl (\(stackHeight', acc) row -> (Nothing, (acc <>) . wrap stackHeight' $ foldOf (folded . _1) row)) (stackHeight, mempty) wRows - where stackHeight = maximumOf (folded . to (ala Sum foldMap . fmap (view _2))) wRows + where stackHeight = Just $ length wRows wrap :: Maybe Int -> Widget -> Widget wrap stackHeight row = case dbsTemplate of DBSTCourse{} -> row