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
fbeac876
Commit
fbeac876
authored
Jul 01, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] box button action close/open to fix variable issue
parent
fceee862
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+13
-6
No files found.
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
fbeac876
module Gargantext.Components.Forest.Tree.Node.Box where
module Gargantext.Components.Forest.Tree.Node.Box where
import Data.Array as A
import Data.Array as A
import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe(..)
, isJust
)
import Data.String as S
import Data.String as S
import Data.Tuple.Nested ((/\))
import Data.Tuple.Nested ((/\))
import Effect.Aff (Aff)
import Effect.Aff (Aff)
...
@@ -206,20 +206,27 @@ buttonClickCpt = R.hooksComponent "G.C.F.T.N.B.buttonClick" cpt
...
@@ -206,20 +206,27 @@ buttonClickCpt = R.hooksComponent "G.C.F.T.N.B.buttonClick" cpt
(action == (Just todo) )
(action == (Just todo) )
, id: show todo
, id: show todo
, title: show todo
, title: show todo
, onClick : mkEffectFn1 $ \_ ->
undo *>
doToDo
, onClick : mkEffectFn1 $ \_ ->
{-undo *>-}
doToDo
}
}
[]
[]
]
]
where
where
action' = if action == (Just todo)
-- FIXME
-- If uncommenting the code below
-- then mpanelAction state is not
-- updated and leads to some bug (state of subtree
-- not updated and search value not initilized)
-- else current action' forces the user to click twice when
-- changing the action button.
action' = if isJust action {-== (Just todo)-}
then Nothing
then Nothing
else (Just todo)
else (Just todo)
{- -- This shows the Help of this button
undo = setNodePopup
undo = setNodePopup
$ const (node { action = Nothing })
$ const (node { action = Nothing })
-}
doToDo = setNodePopup
doToDo = setNodePopup $ const (node { action = action' })
$ const (node { action = action' })
iconAStyle :: GT.NodeType -> NodeAction -> { color :: String
iconAStyle :: GT.NodeType -> NodeAction -> { color :: String
, paddingTop :: String
, paddingTop :: String
...
...
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