Commit 1e022c0f authored by arturo's avatar arturo

[layout] Modal deactivation on Node Add action

* #432
parent 050f9623
......@@ -8,6 +8,7 @@ import Gargantext.Prelude
import DOM.Simple (Window, window)
import Data.Foldable (intercalate)
import Data.Maybe (Maybe(..))
import Data.Tuple.Nested ((/\))
import Data.UUID as UUID
import Effect (Effect)
import Effect.Uncurried (EffectFn2, runEffectFn2)
......@@ -15,6 +16,7 @@ import Gargantext.Components.Bootstrap.Types (ModalSizing(..))
import Gargantext.Hooks.UpdateEffect (useUpdateEffect1')
import Gargantext.Utils ((?))
import Gargantext.Utils.Reactix as R2
import Reactix (useMemo)
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
......@@ -94,12 +96,13 @@ component = R.memo' $ R.hooksComponent componentName cpt where
, noBody
, size
} children
= R.unsafeHooksEffect (UUID.genUUID >>= pure <<< UUID.toString)
>>= \uuid -> do
= do
-- | States
-- |
isVisible <- R2.useLive' isVisibleBox
uuid <- R.unsafeHooksEffect (UUID.genUUID >>= pure <<< UUID.toString)
-- | Computed
-- |
let
......
......@@ -299,7 +299,7 @@ childLoaderCpt = here.component "childLoader" cpt where
closeBox { isBoxVisible } =
liftEffect $ T.write_ false isBoxVisible
refreshTree p@{ reloadTree } = liftEffect $ T2.reload reloadTree *> closeBox p
refreshTree p@{ reloadTree } = liftEffect $ closeBox p *> T2.reload reloadTree
deleteNode' nt p@{ boxes: { forestOpen }, session, tree: (NTree (LNode {id, parent_id}) _) } = do
case nt of
......
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