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
131
Issues
131
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
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
b1169f3d
Unverified
Commit
b1169f3d
authored
Nov 28, 2018
by
Nicolas Pouillard
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Tree] prefer modifyState_ over void modifyState
parent
173d3f4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
Tree.purs
src/Gargantext/Components/Tree.purs
+20
-20
No files found.
src/Gargantext/Components/Tree.purs
View file @
b1169f3d
...
...
@@ -23,7 +23,7 @@ import React (ReactElement)
import React.DOM (a, button, div, h5, i, input, li, span, text, ul)
import React.DOM.Props (_id, _type, className, href, title, onClick, onInput, placeholder, style, value, _data)
import React.DOM.Props as DOM
import Thermite (PerformAction, Render, Spec, createClass, defaultPerformAction, defaultRender, modifyState, simpleSpec)
import Thermite (PerformAction, Render, Spec, createClass, defaultPerformAction, defaultRender, modifyState
_
, simpleSpec)
import Gargantext.Config (toUrl, End(..), NodeType(..), defaultRoot)
import Gargantext.Config.REST (get, put, post, delete, deleteWithBody)
...
...
@@ -61,40 +61,40 @@ mapFTree f {state} = {state: f state}
performAction :: forall props. PerformAction State props Action
performAction (ToggleFolder i) _ _ =
void $
modifyState $ mapFTree $ toggleNode i
performAction (ToggleFolder i) _ _ =
modifyState
_
$ mapFTree $ toggleNode i
performAction (ShowPopOver id) _ _ =
void $
modifyState $ mapFTree $ popOverNode id
performAction (ShowPopOver id) _ _ =
modifyState
_
$ mapFTree $ popOverNode id
performAction (ShowRenameBox id) _ _ =
void $
modifyState $ mapFTree $ showPopOverNode id
performAction (ShowRenameBox id) _ _ =
modifyState
_
$ mapFTree $ showPopOverNode id
performAction (CancelRename id) _ _ =
void $
modifyState $ mapFTree $ showPopOverNode id
performAction (CancelRename id) _ _ =
modifyState
_
$ mapFTree $ showPopOverNode id
performAction (ToggleCreateNode id) _ _ =
void $
modifyState $ mapFTree $ showCreateNode id
performAction (ToggleCreateNode id) _ _ =
modifyState
_
$ mapFTree $ showCreateNode id
performAction (DeleteNode nid) _ _ =
void $
do
performAction (DeleteNode nid) _ _ = do
d <- lift $ deleteNode nid
--- TODO : Need to update state once API is called
pure unit
--- TODO : Need to update state once API is called
performAction (Submit rid s'') _ _ =
void $
do
performAction (Submit rid s'') _ _ = do
d <- lift $ renameNode rid $ RenameValue { name : s''}
-- modifyState_ $ mapFTree $ popOverNode rid
modifyState $ mapFTree $ showPopOverNode rid -- add this function to toggle rename function
modifyState
_
$ mapFTree $ showPopOverNode rid -- add this function to toggle rename function
performAction (RenameNode r nid) _ _ =
void $
modifyState $ mapFTree $ rename nid r
performAction (RenameNode r nid) _ _ =
modifyState
_
$ mapFTree $ rename nid r
performAction (Create nid) _ _ =
void $
modifyState $ mapFTree $ showCreateNode nid
performAction (Create nid) _ _ =
modifyState
_
$ mapFTree $ showCreateNode nid
performAction (SetNodeValue v nid) _ _ =
void $
modifyState $ mapFTree $ setNodeValue nid v
performAction (SetNodeValue v nid) _ _ =
modifyState
_
$ mapFTree $ setNodeValue nid v
popOverNode :: Int -> NTree LNode -> NTree LNode
...
...
Nicolas Pouillard
@np
mentioned in issue
#28 (closed)
·
Nov 29, 2018
mentioned in issue
#28 (closed)
mentioned in issue #28
Toggle commit list
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