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
c0b777db
Commit
c0b777db
authored
Oct 20, 2020
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[docsTable] fix cache on/off changing
parent
cd2cefc4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
DocsTable.purs
src/Gargantext/Components/DocsTable.purs
+3
-1
Types.purs
src/Gargantext/Components/Nodes/Lists/Types.purs
+3
-0
QueryString.purs
src/Gargantext/Utils/QueryString.purs
+1
-1
No files found.
src/Gargantext/Components/DocsTable.purs
View file @
c0b777db
...
...
@@ -77,6 +77,7 @@ type PageLayoutProps = (
cacheState :: R.State NT.CacheState
, corpusId :: Maybe Int
, frontends :: Frontends
, key :: String -- NOTE Necessary to clear the component when cache state changes
, listId :: Int
, nodeId :: Int
, params :: T.Params
...
...
@@ -217,6 +218,7 @@ docViewCpt = R.hooksComponentWithModule thisModule "docView" cpt where
[ pageLayout { cacheState
, corpusId
, frontends
, key: show $ fst cacheState
, listId
, nodeId
, params
...
...
@@ -508,7 +510,7 @@ tableRouteWithPage { listId, nodeId, params: { limit, offset, orderBy, searchTyp
lmt = queryParam "limit" limit
lst = queryParam "list" listId
ofs = queryParam "offset" offset
odb = m
aybe "" (\o -> "orderBy=" <> (T.orderByToForm o))
orderBy
odb = m
QueryParamS "orderBy" T.orderByToForm
orderBy
st = queryParam "searchType" searchType
tt = queryParamS "tabType" (showTabType' tabType)
q = queryParamS "query" query
...
...
src/Gargantext/Components/Nodes/Lists/Types.purs
View file @
c0b777db
...
...
@@ -2,6 +2,7 @@ module Gargantext.Components.Nodes.Lists.Types where
import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Eq (genericEq)
import Data.Generic.Rep.Show (genericShow)
import Gargantext.Prelude
...
...
@@ -12,3 +13,5 @@ data CacheState = CacheOn | CacheOff
derive instance genericCacheState :: Generic CacheState _
instance eqCacheState :: Eq CacheState where
eq = genericEq
instance showCacheState :: Show CacheState where
show = genericShow
src/Gargantext/Utils/QueryString.purs
View file @
c0b777db
...
...
@@ -16,7 +16,7 @@ mQueryParam :: forall a. Show a => String -> Maybe a -> String
mQueryParam _ Nothing = ""
mQueryParam key (Just v) = queryParam key v
mQueryParamS ::
String -> (String -> String) -> Maybe String
-> String
mQueryParamS ::
forall a. String -> (a -> String) -> Maybe a
-> String
mQueryParamS _ _ Nothing = ""
mQueryParamS key mFunc (Just v) = queryParamS key $ mFunc v
...
...
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