Commit 456fa548 authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge branch '340-dev-ngrams-tab-rc1.x' of...

Merge branch '340-dev-ngrams-tab-rc1.x' of ssh://gitlab.iscpif.fr:20022/gargantext/purescript-gargantext into dev-merge
parents 7f7c3c0f e95f63ee
......@@ -264,7 +264,7 @@ type PropsNoReload =
| CommonProps
)
type Props =
type Props =
( reloadForest :: T2.ReloadS
, reloadRoot :: T2.ReloadS
| PropsNoReload )
......@@ -275,13 +275,13 @@ loadedNgramsTableCpt :: R.Component PropsNoReload
loadedNgramsTableCpt = here.component "loadedNgramsTable" cpt where
cpt props@{ path } _ = do
searchQuery <- T.useFocused (_.searchQuery) (\a b -> b { searchQuery = a }) path
pure $ R.fragment $
[ loadedNgramsTableHeader { searchQuery } []
, loadedNgramsTableBody props [] ]
type LoadedNgramsTableHeaderProps =
( searchQuery :: T.Box SearchQuery )
( searchQuery :: T.Box SearchQuery )
loadedNgramsTableHeader :: R2.Component LoadedNgramsTableHeaderProps
loadedNgramsTableHeader = R.createElement loadedNgramsTableHeaderCpt
......@@ -500,9 +500,10 @@ displayRow { ngramsElement: NgramsElement {ngrams, root, list}
, termListFilter
, termSizeFilter } =
(
isNothing root
-- isNothing root
-- ^ Display only nodes without parents
&& maybe true (_ == list) termListFilter
-- ^^ (?) allow child nodes to be searched (see #340)
maybe true (_ == list) termListFilter
-- ^ and which matches the ListType filter.
&& ngramsChildren ^. at ngrams /= Just true
-- ^ and which are not scheduled to be added already
......@@ -562,7 +563,7 @@ mainNgramsTableCacheOnCpt = here.component "mainNgramsTableCacheOn" cpt where
, path
, tabNgramType
, withAutoUpdate } _ = do
-- let path = initialPageParams session nodeId [defaultListId] tabType
path' <- T.useLive T.unequal path
......@@ -731,6 +732,3 @@ sumOccurrences nt = sumOccChildren mempty
optps1 :: forall a. Show a => { desc :: String, mval :: Maybe a } -> R.Element
optps1 { desc, mval } = H.option { value: value } [H.text desc]
where value = maybe "" show mval
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