mirror of
https://github.com/byteverse/colonnade.git
synced 2026-04-05 07:49:48 +02:00
allow a table footer to be passed to cappedResizable
This commit is contained in:
parent
f62d10b75c
commit
3f4d0fb5cd
@ -238,20 +238,24 @@ capped tableAttrs headAttrs bodyAttrs trAttrs fascia cornice collection =
|
|||||||
b <- body bodyAttrs trAttrs (E.discard cornice) collection
|
b <- body bodyAttrs trAttrs (E.discard cornice) collection
|
||||||
return (h `mappend` b)
|
return (h `mappend` b)
|
||||||
|
|
||||||
|
-- | This is useful when you want to be able to toggle the visibility
|
||||||
|
-- of columns after the table has been built.
|
||||||
cappedResizable ::
|
cappedResizable ::
|
||||||
(DomBuilder t m, PostBuild t m, MonadHold t m, Foldable f, Monoid e)
|
(DomBuilder t m, PostBuild t m, MonadHold t m, Foldable f, Monoid e)
|
||||||
=> Map Text Text -- ^ @\<table\>@ tag attributes
|
=> Map Text Text -- ^ @\<table\>@ tag attributes
|
||||||
-> Map Text Text -- ^ @\<thead\>@ tag attributes
|
-> Map Text Text -- ^ @\<thead\>@ tag attributes
|
||||||
-> Map Text Text -- ^ @\<tbody\>@ tag attributes
|
-> Map Text Text -- ^ @\<tbody\>@ tag attributes
|
||||||
|
-> m () -- ^ Content beneath @\<tbody\>@. Should either be empty or a @\<tfoot\>@.
|
||||||
-> (a -> Map Text Text) -- ^ @\<tr\>@ tag attributes
|
-> (a -> Map Text Text) -- ^ @\<tr\>@ tag attributes
|
||||||
-> Fascia p (Map Text Text) -- ^ Attributes for @\<tr\>@ elements in the @\<thead\>@
|
-> Fascia p (Map Text Text) -- ^ Attributes for @\<tr\>@ elements in the @\<thead\>@
|
||||||
-> Cornice (Resizable t Headed) p a (Cell t m e) -- ^ Data encoding strategy
|
-> Cornice (Resizable t Headed) p a (Cell t m e) -- ^ Data encoding strategy
|
||||||
-> f a -- ^ Collection of data
|
-> f a -- ^ Collection of data
|
||||||
-> m e
|
-> m e
|
||||||
cappedResizable tableAttrs headAttrs bodyAttrs trAttrs fascia cornice collection = do
|
cappedResizable tableAttrs headAttrs bodyAttrs beneathBody trAttrs fascia cornice collection = do
|
||||||
elAttr "table" tableAttrs $ do
|
elAttr "table" tableAttrs $ do
|
||||||
h <- encodeCorniceResizableHead headAttrs fascia (dynamicAnnotate cornice)
|
h <- encodeCorniceResizableHead headAttrs fascia (dynamicAnnotate cornice)
|
||||||
b <- bodyResizable bodyAttrs trAttrs (E.discard cornice) collection
|
b <- bodyResizable bodyAttrs trAttrs (E.discard cornice) collection
|
||||||
|
beneathBody
|
||||||
return (h `mappend` b)
|
return (h `mappend` b)
|
||||||
|
|
||||||
dynamicAnnotate :: Reflex t
|
dynamicAnnotate :: Reflex t
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user