[css] fix show/hide tree

parent 37a9c56e
Pipeline #7117 failed with stages
in 11 minutes and 14 seconds
......@@ -79,9 +79,10 @@ router = R2.leaf routerCpt
routerCpt :: R.Component Props
routerCpt = here.component "router" cpt
where
cpt { boxes: boxes@{ handed } } _ = do
cpt { boxes: boxes@{ handed, showTree } } _ = do
-- States
handed' <- R2.useLive' handed
showTree' <- R2.useLive' showTree
-- Computed
let
......@@ -122,9 +123,9 @@ routerCpt = here.component "router" cpt
-- , data: { "bs-dismiss": "offcanvas" } } [] ]
-- , H.div { className: "offcanvas-body" }
-- [ forest { boxes } ] ]
[ H.div { className: "d-none d-lg-block col-lg-3" } [ forest { boxes } ]
[ H.div { className: "col-lg-3 " <> (showTree' ? "" $ "d-none") } [ forest { boxes } ]
-- , H.div { className: "col-md-12 col-lg-8" } [ mainPage { boxes } ]
, H.div { className: "col-md-12 col-lg-9" } [ mainPage { boxes } ]
, H.div { className: "col" } [ mainPage { boxes } ]
, sidePanel { boxes }
]
]
......@@ -250,7 +251,7 @@ forestCpt = R.memo' $ here.component "forest" cpt
where
cpt { boxes } _ = do
-- States
showTree' <- R2.useLive' boxes.showTree
-- showTree' <- R2.useLive' boxes.showTree
-- Hooks
resizeHandler <- useResizeHandler
......@@ -270,7 +271,7 @@ forestCpt = R.memo' $ here.component "forest" cpt
{ className: "router__aside"
-- @XXX: ReactJS lack of "keep-alive" feature workaround solution
-- @link https://github.com/facebook/react/issues/12039
-- , style: { display: showTree' ? "block" $ "none" }
-- , style: { display: showTree' ? "" $ "none" }
}
[ H.div
{ className: "router__aside__inner" }
......
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