Commit 15adf4ae authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski Committed by Alexandre Delanoë

[ngrams] fix displayRow filtering

We want to show pending changes always.
parent ca1d6f48
...@@ -543,24 +543,23 @@ displayRow state@{ ngramsChildren ...@@ -543,24 +543,23 @@ displayRow state@{ ngramsChildren
ngramsParentRoot ngramsParentRoot
termListFilter termListFilter
(NgramsElement {ngrams, root, list}) = (NgramsElement {ngrams, root, list}) =
maybe true (_ == list) termListFilter isNothing root
-- ^ Display only nodes without parents
&& maybe true (_ == list) termListFilter
-- ^ and which matches the ListType filter. -- ^ and which matches the ListType filter.
&& queryMatchesLabel searchQuery (ngramsTermText ngrams) && queryMatchesLabel searchQuery (ngramsTermText ngrams)
-- ^ and which matches the search query. -- ^ and which matches the search query.
&& ( && ngramsChildren ^. at ngrams /= Just true
isNothing root -- ^ and which are not scheduled to be added already
-- ^ Display only nodes without parents && Just ngrams /= ngramsParent
&& ngramsChildren ^. at ngrams /= Just true -- ^ and which are not our new parent
-- ^ and which are not scheduled to be added already && Just ngrams /= ngramsParentRoot
&& Just ngrams /= ngramsParent -- ^ and which are not the root of our new parent
-- ^ and which are not our new parent || ngramsChildren ^. at ngrams == Just false
&& Just ngrams /= ngramsParentRoot -- ^ unless they are scheduled to be removed.
-- ^ and which are not the root of our new parent || tablePatchHasNgrams ngramsLocalPatch ngrams
|| ngramsChildren ^. at ngrams == Just false -- ^ unless they are being processed at the moment.
-- ^ unless they are scheduled to be removed.
|| tablePatchHasNgrams ngramsLocalPatch ngrams
-- ^ unless they are being processed at the moment.
)
type MainNgramsTableProps = type MainNgramsTableProps =
( nodeId :: Int ( nodeId :: Int
......
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