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
7a266422
Commit
7a266422
authored
Sep 27, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/425-dev-terms-page-reset' into dev-merge
parents
a8ba5031
4eb82bba
Changes
2
Show 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 @
7a266422
...
@@ -41,6 +41,7 @@ import Gargantext.Components.NgramsTable.SelectionCheckbox as NTSC
...
@@ -41,6 +41,7 @@ import Gargantext.Components.NgramsTable.SelectionCheckbox as NTSC
import Gargantext.Components.NgramsTable.SyncResetButton (syncResetButtons)
import Gargantext.Components.NgramsTable.SyncResetButton (syncResetButtons)
import Gargantext.Components.NgramsTable.Tree (renderNgramsItem, renderNgramsTree)
import Gargantext.Components.NgramsTable.Tree (renderNgramsItem, renderNgramsTree)
import Gargantext.Components.Nodes.Lists.Types as NT
import Gargantext.Components.Nodes.Lists.Types as NT
import Gargantext.Components.Table (changePage)
import Gargantext.Components.Table as TT
import Gargantext.Components.Table as TT
import Gargantext.Components.Table.Types as TT
import Gargantext.Components.Table.Types as TT
import Gargantext.Config.REST (AffRESTError, RESTError, logRESTError)
import Gargantext.Config.REST (AffRESTError, RESTError, logRESTError)
...
@@ -155,6 +156,7 @@ tableContainerCpt { addCallback
...
@@ -155,6 +156,7 @@ tableContainerCpt { addCallback
, termSizeFilter
, termSizeFilter
, params
, params
} <- T.useLive T.unequal path
} <- T.useLive T.unequal path
params <- T.useFocused (_.params) (\a b -> b { params = a }) path
-- | Computed
-- | Computed
-- |
-- |
...
@@ -218,7 +220,7 @@ tableContainerCpt { addCallback
...
@@ -218,7 +220,7 @@ tableContainerCpt { addCallback
{ id: "picklistmenu"
{ id: "picklistmenu"
, className: "form-control custom-select"
, className: "form-control custom-select"
, defaultValue: (maybe "" show termListFilter)
, defaultValue: (maybe "" show termListFilter)
, on: {change:
setTermListFilter <<< read <<< R.unsafeEventValue
}
, on: {change:
changeTermList params
}
}
}
(map optps1 termLists)
(map optps1 termLists)
]
]
...
@@ -234,7 +236,7 @@ tableContainerCpt { addCallback
...
@@ -234,7 +236,7 @@ tableContainerCpt { addCallback
{ id: "picktermtype"
{ id: "picktermtype"
, className: "form-control custom-select"
, className: "form-control custom-select"
, defaultValue: (maybe "" show termSizeFilter)
, defaultValue: (maybe "" show termSizeFilter)
, on: {change:
setTermSizeFilter <<< read <<< R.unsafeEventValue
}
, on: {change:
changeTermSize params
}
}
}
(map optps1 termSizes)
(map optps1 termSizes)
]
]
...
@@ -355,6 +357,14 @@ tableContainerCpt { addCallback
...
@@ -355,6 +357,14 @@ tableContainerCpt { addCallback
setTermSizeFilter x = T.modify (_ { termSizeFilter = x }) path
setTermSizeFilter x = T.modify (_ { termSizeFilter = x }) path
setSelection term = dispatch $ setTermListSetA ngramsTableCache ngramsSelection term
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 :: Set NgramsTerm -> Boolean
selectionsExist = not <<< Set.isEmpty
selectionsExist = not <<< Set.isEmpty
...
...
src/Gargantext/Components/Table.purs
View file @
7a266422
...
@@ -426,7 +426,8 @@ sizeDDCpt = here.component "sizeDD" cpt
...
@@ -426,7 +426,8 @@ sizeDDCpt = here.component "sizeDD" cpt
className = "form-control"
className = "form-control"
change e = do
change e = do
let ps = string2PageSize $ R.unsafeEventValue e
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
sizes = map option pageSizes
option size = H.option {value} [H.text value]
option size = H.option {value} [H.text value]
where value = show size
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