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
c5b11698
Commit
c5b11698
authored
Mar 12, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[toestand] some NgramsTable work
parent
38f1fe6f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
37 deletions
+37
-37
NgramsTable.purs
src/Gargantext/Components/NgramsTable.purs
+37
-37
No files found.
src/Gargantext/Components/NgramsTable.purs
View file @
c5b11698
...
...
@@ -306,27 +306,7 @@ loadedNgramsTableCpt = here.component "loadedNgramsTable" cpt where
-- R.useEffectOnce' $ do
-- T.listen (\_ -> TT.changePage 1 params) searchQuery
-- filteredRows :: PreConversionRows
-- no need to filter offset if cache is off
let filteredRows = if cacheState == NT.CacheOn then TT.filterRows { params: params' } rows else rows
filteredConvertedRows :: TT.Rows
filteredConvertedRows = convertRow <$> filteredRows
convertRow ngramsElement =
{ row: NTC.renderNgramsItem { dispatch: performAction
, ngrams: ngramsElement ^. _NgramsElement <<< _ngrams
, ngramsElement
, ngramsLocalPatch
, ngramsParent
, ngramsSelection
, ngramsTable
, sidePanelTriggers } []
, delete: false
}
allNgramsSelected = allNgramsSelectedOnFirstPage ngramsSelection filteredRows
rows :: PreConversionRows
let rows :: PreConversionRows
rows = orderWith (
Seq.mapMaybe (\(Tuple ng nre) ->
let Additive s = ng_scores ^. at ng <<< _Just in
...
...
@@ -347,6 +327,26 @@ loadedNgramsTableCpt = here.component "loadedNgramsTable" cpt where
Just TermDesc -> sortWith \x -> Down $ x ^. _NgramsElement <<< _ngrams
_ -> identity -- the server ordering is enough here
-- filteredRows :: PreConversionRows
-- no need to filter offset if cache is off
filteredRows = if cacheState == NT.CacheOn then TT.filterRows { params: params' } rows else rows
filteredConvertedRows :: TT.Rows
filteredConvertedRows = convertRow <$> filteredRows
convertRow ngramsElement =
{ row: NTC.renderNgramsItem { dispatch: performAction
, ngrams: ngramsElement ^. _NgramsElement <<< _ngrams
, ngramsElement
, ngramsLocalPatch
, ngramsParent
, ngramsSelection
, ngramsTable
, sidePanelTriggers } []
, delete: false
}
allNgramsSelected = allNgramsSelectedOnFirstPage ngramsSelection filteredRows
totalRecords = fromMaybe (Seq.length rows) mTotalRows
performAction = mkDispatch { filteredRows
...
...
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