Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
2051c952
Commit
2051c952
authored
May 22, 2023
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/544-dev-term-table-suggestion-fix-for-children' into dev
parents
7f7ac4ad
d0dad1e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
NgramsTable.purs
src/Gargantext/Components/NgramsTable.purs
+4
-3
No files found.
src/Gargantext/Components/NgramsTable.purs
View file @
2051c952
...
...
@@ -518,8 +518,10 @@ loadedNgramsTableBodyCpt = here.component "loadedNgramsTableBody" cpt where
rows :: PreConversionRows
rows = ngramsTableOrderWith orderBy (Seq.mapMaybe rowMap nres)
nres = Map.toUnfoldable (ngramsTable ^. _NgramsTable <<< _ngrams_repo_elements)
ngramMatches matcher ng nre =
any matcher $ (Set.map ngramsTermText $ Set.insert ng $ nre ^. _NgramsRepoElement <<< _children)
rootOfMatch (Tuple ng nre) =
if
queryMatchesLabel searchQuery (ngramsTermText ng)
if
ngramMatches (queryMatchesLabel searchQuery) ng nre
then Just (fromMaybe ng (nre ^. _NgramsRepoElement <<< _root))
else Nothing
rootsWithMatches = Set.fromFoldable (Seq.mapMaybe rootOfMatch nres)
...
...
@@ -529,8 +531,7 @@ loadedNgramsTableBodyCpt = here.component "loadedNgramsTableBody" cpt where
-- | Match either ngrams term or its children with the
-- | `queryExactMatchesLabel` function.
fltr :: Tuple NgramsTerm NgramsRepoElement -> Boolean
fltr (Tuple ng (NgramsRepoElement { children })) =
any (queryExactMatchesLabel searchQuery) $ (Set.map ngramsTermText $ Set.insert ng children)
fltr (Tuple ng nre) = ngramMatches (queryExactMatchesLabel searchQuery) ng nre
rowsFilter :: NgramsElement -> Maybe NgramsElement
rowsFilter ngramsElement =
if displayRow { ngramsElement
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment