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
4eb82bba
Commit
4eb82bba
authored
Sep 20, 2022
by
Karen Konou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Ngrams Table] terms page reset on params change
parent
918c086d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
NgramsTable.purs
src/Gargantext/Components/NgramsTable.purs
+12
-2
Table.purs
src/Gargantext/Components/Table.purs
+2
-1
No files found.
src/Gargantext/Components/NgramsTable.purs
View file @
4eb82bba
...
...
@@ -41,6 +41,7 @@ import Gargantext.Components.NgramsTable.SelectionCheckbox as NTSC
import Gargantext.Components.NgramsTable.SyncResetButton (syncResetButtons)
import Gargantext.Components.NgramsTable.Tree (renderNgramsItem, renderNgramsTree)
import Gargantext.Components.Nodes.Lists.Types as NT
import Gargantext.Components.Table (changePage)
import Gargantext.Components.Table as TT
import Gargantext.Components.Table.Types as TT
import Gargantext.Config.REST (AffRESTError, RESTError, logRESTError)
...
...
@@ -154,6 +155,7 @@ tableContainerCpt { addCallback
, termListFilter
, termSizeFilter
} <- T.useLive T.unequal path
params <- T.useFocused (_.params) (\a b -> b { params = a }) path
-- | Computed
-- |
...
...
@@ -217,7 +219,7 @@ tableContainerCpt { addCallback
{ id: "picklistmenu"
, className: "form-control custom-select"
, defaultValue: (maybe "" show termListFilter)
, on: {change:
setTermListFilter <<< read <<< R.unsafeEventValue
}
, on: {change:
changeTermList params
}
}
(map optps1 termLists)
]
...
...
@@ -233,7 +235,7 @@ tableContainerCpt { addCallback
{ id: "picktermtype"
, className: "form-control custom-select"
, defaultValue: (maybe "" show termSizeFilter)
, on: {change:
setTermSizeFilter <<< read <<< R.unsafeEventValue
}
, on: {change:
changeTermSize params
}
}
(map optps1 termSizes)
]
...
...
@@ -354,6 +356,14 @@ tableContainerCpt { addCallback
setTermSizeFilter x = T.modify (_ { termSizeFilter = x }) path
setSelection term = dispatch $ setTermListSetA ngramsTableCache ngramsSelection term
changeTermList params e = do
_ <- setTermListFilter $ read $ R.unsafeEventValue e
changePage 1 params
changeTermSize params e = do
_ <- setTermSizeFilter $ read $ R.unsafeEventValue e
changePage 1 params
selectionsExist :: Set NgramsTerm -> Boolean
selectionsExist = not <<< Set.isEmpty
...
...
src/Gargantext/Components/Table.purs
View file @
4eb82bba
...
...
@@ -426,7 +426,8 @@ sizeDDCpt = here.component "sizeDD" cpt
className = "form-control"
change e = do
let ps = string2PageSize $ R.unsafeEventValue e
T.modify (\p -> stateParams $ (paramsState p) { pageSize = ps }) params
_ <- T.modify (\p -> stateParams $ (paramsState p) { pageSize = ps }) params
changePage 1 params
sizes = map option pageSizes
option size = H.option {value} [H.text value]
where value = show size
...
...
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