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