fix problem with cells not being hidden

This commit is contained in:
Andrew Martin 2017-10-05 15:28:25 -04:00
parent eeaa05d2a2
commit 0427fd82e2
3 changed files with 12 additions and 8 deletions

View File

@ -1,7 +1,7 @@
{
"url": "https://github.com/reflex-frp/reflex-platform",
"rev": "1670c5b899658babeda58329d3df6b943cf6aeca",
"rev": "0446e9df3adfc7271015c278a2ec5b7e7a6a46f3",
"date": "2017-05-05T11:40:26-04:00",
"sha256": "0ry3fcxiqr43c5fghsiqn0iarj4gfvk77jkc4na7j7r3k8vjdjh2",
"sha256": "0v0d53xqrmh0i01iiq1flq66gw3cb6g9894j94cflsavmhih8y1d",
"fetchSubmodules": true
}

View File

@ -20,7 +20,7 @@ library
base >= 4.7 && < 5.0
, colonnade >= 1.1 && < 1.2
, contravariant >= 1.2 && < 1.5
, vector >= 0.10 && < 0.12
, vector >= 0.10 && < 0.13
, text >= 1.0 && < 1.3
, reflex == 0.5.*
, reflex-dom == 0.4.*

View File

@ -600,9 +600,9 @@ paginated (Bureau tableAttrs theadAttrs bodyAttrs trAttrs) (Pagination pageSize
colLifted = PF.lmap (fmap (\(Visible _ a) -> a)) col
makeVals :: Dynamic t Int -> Vector (Dynamic t (Visible a))
makeVals page = V.generate pageSize $ \ix -> do
p <- page
v <- vecD
return (maybe (Visible False aDef) (Visible True) (v V.!? (p * pageSize + ix)))
p <- page
v <- vecD
return (maybe (Visible False aDef) (Visible True) (v V.!? (p * pageSize + ix)))
totalPages :: Dynamic t Int
totalPages = fmap ((`divRoundUp` pageSize) . V.length) vecD
hideWhenUnipage :: Dynamic t (Map Text Text) -> Dynamic t (Map Text Text)
@ -767,7 +767,9 @@ rowSizableReified :: (Sizable t b h, Cellular t m c)
-> m e
rowSizableReified theEmpty theAppend (E.Colonnade v) a = V.foldM (\m oc -> do
let c = E.oneColonnadeEncode oc a
e <- elDynAttr "td" (cellularAttrs c) $ do
sz = sizableSize (E.oneColonnadeHead oc)
attrs = zipDynWith insertSizeAttr sz (cellularAttrs c)
e <- elDynAttr "td" attrs $ do
cellularContents c
return (theAppend m e)
) theEmpty v
@ -778,7 +780,9 @@ rowSizable :: (Sizable t b h, Cellular t m c, Monoid e)
-> m e
rowSizable (E.Colonnade v) a = V.foldM (\m oc -> do
let c = E.oneColonnadeEncode oc a
e <- elDynAttr "td" (cellularAttrs c) $ do
sz = sizableSize (E.oneColonnadeHead oc)
attrs = zipDynWith insertSizeAttr sz (cellularAttrs c)
e <- elDynAttr "td" attrs $ do
cellularContents c
return (mappend m e)
) mempty v