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
e2f88a6d
Unverified
Commit
e2f88a6d
authored
Dec 03, 2018
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Show instances for Mode, OrderByDirection and ColumnName
parent
1391a677
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
Table.purs
src/Gargantext/Components/Table.purs
+12
-0
NgramsTable.purs
src/Gargantext/Pages/Corpus/Tabs/Ngrams/NgramsTable.purs
+7
-0
No files found.
src/Gargantext/Components/Table.purs
View file @
e2f88a6d
...
...
@@ -3,6 +3,8 @@ module Gargantext.Components.Table where
import Data.Array (filter)
import Data.Maybe (Maybe(..), maybe)
import Data.Either (Either(..))
import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow)
import Effect (Effect)
import Effect.Class (liftEffect)
import React (ReactElement, ReactClass, Children, createElement)
...
...
@@ -31,6 +33,11 @@ type Params = { offset :: Int, limit :: Int, orderBy :: OrderBy }
newtype ColumnName = ColumnName String
derive instance genericColumnName :: Generic ColumnName _
instance showColumnName :: Show ColumnName where
show = genericShow
derive instance eqColumnName :: Eq ColumnName
columnName :: ColumnName -> String
...
...
@@ -38,6 +45,11 @@ columnName (ColumnName c) = c
data OrderByDirection a = ASC a | DESC a
derive instance genericOrderByDirection :: Generic (OrderByDirection a) _
instance showOrderByDirection :: Show a => Show (OrderByDirection a) where
show = genericShow
derive instance eqOrderByDirection :: Eq a => Eq (OrderByDirection a)
type Props' =
...
...
src/Gargantext/Pages/Corpus/Tabs/Ngrams/NgramsTable.purs
View file @
e2f88a6d
...
...
@@ -8,6 +8,8 @@ import Data.Either (Either(..))
import Data.Foldable
import Data.FoldableWithIndex
import Data.FunctorWithIndex
import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow)
import Data.Newtype (class Newtype, unwrap)
import Data.Lens (Lens', Prism', Iso', lens, over, prism, (^.), (^..), (%~), (.=), use, (<>~))
import Data.Lens.Common (_Just)
...
...
@@ -295,6 +297,11 @@ data Action
data Mode = Authors | Sources | Institutes | Terms
derive instance genericMode :: Generic Mode _
instance showMode :: Show Mode where
show = genericShow
derive instance eqMode :: Eq Mode
type Dispatch = Action -> Effect Unit
...
...
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