Commit faa5ccfb authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] nav tab for table

parent df122b87
...@@ -32,20 +32,20 @@ tabsCpt = R.hooksComponentWithModule thisModule "tabs" cpt ...@@ -32,20 +32,20 @@ tabsCpt = R.hooksComponentWithModule thisModule "tabs" cpt
[ H.br {} [ H.br {}
, H.div { className: "nav nav-tabs" , H.div { className: "nav nav-tabs"
, title : "Search result" , title : "Search result"
} [H.text "" ] } -- [H.text "" ]
-- (mapWithIndex (button setActiveTab activeTab) props.tabs) (mapWithIndex (button setActiveTab activeTab) props.tabs)
] ]
, H.div { className: "tab-content" } , H.div { className: "tab-content" }
$ mapWithIndex (item activeTab) props.tabs $ mapWithIndex (item activeTab) props.tabs
] ]
{- --{-
button setActiveTab selected index (name /\ _) = button setActiveTab selected index (name /\ _) =
H.a { className, on: { click } } [ H.text name ] H.a { className, on: { click } } [ H.text name ]
where where
eq = index == selected eq = index == selected
className = "nav-item nav-link" <> (if eq then " active" else "") className = "nav-item nav-link" <> (if eq then " active" else "")
click e = setActiveTab (const index) click e = setActiveTab (const index)
-} --}
item selected index (_ /\ cpt') = tab { selected, index } [ cpt' ] item selected index (_ /\ cpt') = tab { selected, index } [ cpt' ]
-- TODO: document what these are (selection, item indices) -- TODO: document what these are (selection, item indices)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment