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
e558ac4c
Commit
e558ac4c
authored
Dec 11, 2020
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tree] sort children properly (by id)
parent
5530fae5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
Tree.purs
src/Gargantext/Components/Forest/Tree.purs
+7
-12
No files found.
src/Gargantext/Components/Forest/Tree.purs
View file @
e558ac4c
...
...
@@ -337,7 +337,7 @@ toHtmlFirstLevel = R.createElement elCpt
, id: cId
}
) []
) publicizedChildren
)
$ sorted
publicizedChildren
)
-- childNodesFirstLevel ( Record.merge commonProps
-- { asyncTasks
...
...
@@ -351,6 +351,9 @@ toHtmlFirstLevel = R.createElement elCpt
-- }
-- )
sorted :: Array FTree -> Array FTree
sorted = A.sortWith (\(NTree (LNode {id}) _) -> id)
type ChildNodesProps =
( asyncTasks :: GAT.Reductor
...
...
@@ -420,7 +423,9 @@ childNodeFirstLevelPaint = R.createElement elCpt
elCpt :: R.Component ChildNodeFirstLevelPaintProps
elCpt = R.hooksComponentWithModule thisModule "childNodeFirstLevelPaint" cpt
cpt props@{ asyncTasks, handed, folderOpen: (false /\ _), reload, tree: ctree@(NTree (LNode { id }) _) } _ = do
-- TODO folderOpen is unused
cpt props@{ asyncTasks, handed, reload, tree: ctree@(NTree (LNode { id }) _) } _ = do
pure $ H.ul {} [
toHtmlFirstLevel (Record.merge commonProps { asyncTasks
, handed
...
...
@@ -430,16 +435,6 @@ childNodeFirstLevelPaint = R.createElement elCpt
-- pure $ H.div { } [ H.text $ "[closed] Node id " <> show id ]
where
commonProps = RecordE.pick props :: Record CommonProps
cpt props@{ asyncTasks, handed, folderOpen: (true /\ _), reload, tree: ctree@(NTree (LNode { id }) _) } _ = do
pure $ H.ul {} [
toHtmlFirstLevel (Record.merge commonProps { asyncTasks
, handed
, tree: ctree }
) []
]
-- pure $ H.div { } [ H.text $ "[opened] Node id " <> show id ]
where
commonProps = RecordE.pick props :: Record CommonProps
type PerformActionProps =
...
...
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