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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
purescript-gargantext
Commits
30ea6365
Commit
30ea6365
authored
May 08, 2022
by
Karen Konou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Table] fix reload
parent
9de858ae
Pipeline
#2804
failed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
13 deletions
+28
-13
Lists.purs
src/Gargantext/Components/Nodes/Lists.purs
+1
-2
Tabs.purs
src/Gargantext/Components/Nodes/Lists/Tabs.purs
+27
-11
No files found.
src/Gargantext/Components/Nodes/Lists.purs
View file @
30ea6365
...
@@ -49,12 +49,11 @@ listsLayoutWithKey :: R2.Component ( key :: String | Props )
...
@@ -49,12 +49,11 @@ listsLayoutWithKey :: R2.Component ( key :: String | Props )
listsLayoutWithKey = R.createElement listsLayoutWithKeyCpt
listsLayoutWithKey = R.createElement listsLayoutWithKeyCpt
listsLayoutWithKeyCpt :: R.Component ( key :: String | Props )
listsLayoutWithKeyCpt :: R.Component ( key :: String | Props )
listsLayoutWithKeyCpt = here.component "listsLayoutWithKey" cpt where
listsLayoutWithKeyCpt = here.component "listsLayoutWithKey" cpt where
cpt { boxes
: boxes@{ reloadMainPage }
cpt { boxes
, nodeId
, nodeId
, session
, session
, sessionUpdate } _ = do
, sessionUpdate } _ = do
activeTab <- T.useBox 0
activeTab <- T.useBox 0
_reloadMainPage' <- T.useLive T.unequal reloadMainPage
let path = { nodeId, session }
let path = { nodeId, session }
...
...
src/Gargantext/Components/Nodes/Lists/Tabs.purs
View file @
30ea6365
...
@@ -8,6 +8,7 @@ import Data.Tuple.Nested ((/\))
...
@@ -8,6 +8,7 @@ import Data.Tuple.Nested ((/\))
import Effect.Class (liftEffect)
import Effect.Class (liftEffect)
import Gargantext.Components.App.Store (Boxes)
import Gargantext.Components.App.Store (Boxes)
import Gargantext.Components.NgramsTable as NT
import Gargantext.Components.NgramsTable as NT
import Gargantext.Components.NgramsTable.Core (PageParams)
import Gargantext.Components.NgramsTable.Core as NTC
import Gargantext.Components.NgramsTable.Core as NTC
import Gargantext.Components.Nodes.Corpus.Chart.Metrics (metrics)
import Gargantext.Components.Nodes.Corpus.Chart.Metrics (metrics)
import Gargantext.Components.Nodes.Corpus.Chart.Pie (pie, bar)
import Gargantext.Components.Nodes.Corpus.Chart.Pie (pie, bar)
...
@@ -51,9 +52,31 @@ tabsCpt = here.component "tabs" cpt where
...
@@ -51,9 +52,31 @@ tabsCpt = here.component "tabs" cpt where
, "Sources" /\ view Sources []
, "Sources" /\ view Sources []
]
]
common = RX.pick props :: Record Props
common = RX.pick props :: Record Props
view mode =
ngramsView
$ Record.merge common { mode }
view mode =
tab
$ Record.merge common { mode }
type NgramsViewProps = ( mode :: Mode | Props )
type TabProps = ( mode :: Mode | Props )
tab :: R2.Component TabProps
tab = R.createElement tabCpt
tabCpt :: R.Component TabProps
tabCpt = here.component "tab" cpt where
cpt props _ = do
path <- T.useBox $ NTC.initialPageParams props.session initialPath.corpusId [initialPath.listId] initialPath.tabType
pure $ ngramsView (Record.merge props { path }) []
where
tabNgramType = modeTabType props.mode
tabType = TabCorpus (TabNgramType tabNgramType)
listId = props.corpusData.defaultListId
corpusId = props.corpusId
initialPath = { corpusId
-- , limit: Just 1000
, listId
, tabType
}
type NgramsViewProps = ( path :: T.Box PageParams | TabProps )
ngramsView :: R2.Component NgramsViewProps
ngramsView :: R2.Component NgramsViewProps
ngramsView = R.createElement ngramsViewCpt
ngramsView = R.createElement ngramsViewCpt
...
@@ -62,12 +85,11 @@ ngramsViewCpt = here.component "ngramsView" cpt where
...
@@ -62,12 +85,11 @@ ngramsViewCpt = here.component "ngramsView" cpt where
cpt props@{ boxes
cpt props@{ boxes
, cacheState
, cacheState
, corpusData: { defaultListId }
, corpusData: { defaultListId }
, corpusId
, mode
, mode
, session } _ = do
, session
, path } _ = do
chartsReload <- T.useBox T2.newReload
chartsReload <- T.useBox T2.newReload
path <- T.useBox $ NTC.initialPageParams props.session initialPath.corpusId [initialPath.listId] initialPath.tabType
{ listIds, nodeId, params } <- T.useLive T.unequal path
{ listIds, nodeId, params } <- T.useLive T.unequal path
pure $
pure $
...
@@ -109,12 +131,6 @@ ngramsViewCpt = here.component "ngramsView" cpt where
...
@@ -109,12 +131,6 @@ ngramsViewCpt = here.component "ngramsView" cpt where
tabNgramType = modeTabType mode
tabNgramType = modeTabType mode
tabType = TabCorpus (TabNgramType tabNgramType)
tabType = TabCorpus (TabNgramType tabNgramType)
mNgramsType = mNgramsTypeFromTabType tabType
mNgramsType = mNgramsTypeFromTabType tabType
listId = defaultListId
initialPath = { corpusId
-- , limit: Just 1000
, listId
, tabType
}
...
...
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