[ngrams] turn off modifications of children for depth > 0

parent 8ea18150
...@@ -330,7 +330,13 @@ renderNgramsItemCpt = here.component "renderNgramsItem" cpt ...@@ -330,7 +330,13 @@ renderNgramsItemCpt = here.component "renderNgramsItem" cpt
termList = ngramsElement ^. _NgramsElement <<< _list termList = ngramsElement ^. _NgramsElement <<< _list
ngramsStyle :: Array DOM.Props ngramsStyle :: Array DOM.Props
ngramsStyle = [termStyle termList ngramsOpacity] ngramsStyle = [termStyle termList ngramsOpacity]
ngramsEdit { ngrams: n } = Just $ dispatch $ SetParentResetChildren (Just n) (ngramsChildren n) ngramsEdit :: NgramsDepth -> Maybe (Effect Unit)
ngramsEdit { ngrams: n, depth: 0 } =
Just $ dispatch $ SetParentResetChildren (Just n) (ngramsChildren n)
-- NOTE: Currently we allow modifying children only for root
-- terms. I.e. we don't allow trees with depth greater than 1
-- See: https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/565
ngramsEdit _ = Nothing
tbl :: NgramsTable tbl :: NgramsTable
tbl = applyNgramsPatches { ngramsLocalPatch tbl = applyNgramsPatches { ngramsLocalPatch
, ngramsStagePatch: mempty , ngramsStagePatch: mempty
......
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