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