fix(dbtable): calculate height of header correctly

Fixes #634
This commit is contained in:
Gregor Kleen 2020-09-10 16:45:16 +02:00
parent 0cdd85eed1
commit 5659f2df1e

View File

@ -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