mirror of
https://github.com/byteverse/colonnade.git
synced 2024-10-26 08:03:25 +03:00
expandablePreloaded no longer discards header row stuff
This commit is contained in:
parent
518423ef9e
commit
11ced47370
@ -655,7 +655,8 @@ expandablePreloaded :: forall t m e a. (MonadWidget t m, Semigroup e)
|
||||
-> m (Event t e)
|
||||
expandablePreloaded (Bureau tableAttrs (E.Headed (theadAttrs,theadRowAttrs)) bodyAttrs _trBuildAttrs) f n colonnade@(E.Colonnade v) xs = do
|
||||
elDynAttr "table" tableAttrs $ do
|
||||
_ <- elDynAttr "thead" theadAttrs $ elDynAttr "tr" theadRowAttrs $ E.headerMonadicGeneral_ colonnade (el "th")
|
||||
(_,ds) <- elDynAttr "thead" theadAttrs $ elDynAttr "tr" theadRowAttrs $ do
|
||||
E.headerMonadicGeneral colonnade (fmap (\(x,y) -> ([x],[y])) . el "th")
|
||||
ys <- sample (current xs)
|
||||
es <- elDynAttr "tbody" bodyAttrs $ forM (enumFromTo 0 (n - 1)) $ \ix -> do
|
||||
let stream = fmapMaybe (V.!? ix) (updated xs)
|
||||
@ -665,7 +666,7 @@ expandablePreloaded (Bureau tableAttrs (E.Headed (theadAttrs,theadRowAttrs)) bod
|
||||
Just y -> do
|
||||
a <- holdDyn y stream
|
||||
buildRow a visible
|
||||
pure (mconcat es)
|
||||
pure (mconcat (mconcat ds : es))
|
||||
where
|
||||
vlen = V.length v
|
||||
buildRow :: Dynamic t a -> Dynamic t Bool -> m (Event t e)
|
||||
|
Loading…
Reference in New Issue
Block a user