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
215e7156
Unverified
Commit
215e7156
authored
Nov 23, 2018
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NGRAMS]: add mode to path
parent
1e1a2c3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
NgramsTable.purs
src/Gargantext/Pages/Corpus/Tabs/Ngrams/NgramsTable.purs
+10
-8
No files found.
src/Gargantext/Pages/Corpus/Tabs/Ngrams/NgramsTable.purs
View file @
215e7156
...
...
@@ -52,7 +52,7 @@ import Gargantext.Pages.Corpus.Tabs.Types (CorpusInfo(..), PropsRow)
type Props = { mode :: Mode | PropsRow }
type PageParams = {nodeId :: Int, params :: T.Params}
type PageParams = {nodeId :: Int, params :: T.Params
, mode :: Mode
}
type Props' = { path :: PageParams
, loaded :: Maybe NgramsTable
...
...
@@ -299,6 +299,8 @@ data Action
data Mode = Authors | Sources | Institutes | Terms
derive instance eqMode :: Eq Mode
type Dispatch = Action -> Effect Unit
tableContainer :: { searchQuery :: String
...
...
@@ -429,14 +431,14 @@ ngramsTableSpec' = simpleSpec performAction render
-- patch the root of the child to be equal to the root of the parent.
render :: Render State Props' Action
render dispatch { path: {nodeId}
render dispatch { path: {nodeId
, mode
}
, loaded: initTable
, dispatch: loaderDispatch }
{ ngramsTablePatch, ngramsParent, ngramsChildren, searchQuery }
_reactChildren =
[ T.tableElt
{ rows
, setParams: \params -> loaderDispatch (Loader.SetPath {nodeId, params})
, setParams: \params -> loaderDispatch (Loader.SetPath {nodeId, params
, mode
})
, container: tableContainer {searchQuery, dispatch, ngramsParent, ngramsChildren, ngramsTable}
, colNames:
T.ColumnName <$>
...
...
@@ -480,8 +482,8 @@ ngramsTableSpec' = simpleSpec performAction render
, delete: false
}
initialPageParams :: Int -> PageParams
initialPageParams nodeId
= {nodeId, params: T.initialParams
}
initialPageParams :: Int ->
Mode ->
PageParams
initialPageParams nodeId
mode = {nodeId, params: T.initialParams, mode
}
type PageLoaderProps =
{ path :: PageParams
...
...
@@ -505,9 +507,9 @@ ngramsTableSpec :: Spec {} Props Void
ngramsTableSpec = simpleSpec defaultPerformAction render
where
render :: Render {} Props Void
render _ {path: nodeId} _ _ =
-- TODO: ignored
mode,
ignored loaded: corpusInfo
[ ngramsLoader { path: initialPageParams nodeId
render _ {path: nodeId
, mode
} _ _ =
-- TODO: ignored ignored loaded: corpusInfo
[ ngramsLoader { path: initialPageParams nodeId
mode
, component: createClass "NgramsTableLayout" ngramsTableSpec' initialState
} ]
...
...
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