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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
66ad76db
Commit
66ad76db
authored
Mar 13, 2020
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Popover] onOpen/onClose props
parent
9a759b06
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
Box.purs
src/Gargantext/Components/Forest/Tree/Node/Box.purs
+5
-2
Popover.purs
src/Gargantext/Utils/Popover.purs
+7
-4
No files found.
src/Gargantext/Components/Forest/Tree/Node/Box.purs
View file @
66ad76db
...
...
@@ -4,7 +4,7 @@ import Gargantext.Prelude
import Data.Maybe (Maybe(..))
import Data.Nullable (null)
import Data.Tuple (Tuple(..), snd)
import Data.Tuple (Tuple(..),
fst,
snd)
import Data.Tuple.Nested ((/\))
import DOM.Simple.Console (log2)
import Effect (Effect)
...
...
@@ -69,6 +69,7 @@ nodeMainSpan p@{ dispatch, folderOpen, frontends, session } = R.createElement el
-- only 1 popup at a time is allowed to be opened
droppedFile <- R.useState' (Nothing :: Maybe DroppedFile)
isDragOver <- R.useState' false
popoverOpen <- R.useState' false
popperRef <- R.useRef null
...
...
@@ -82,7 +83,9 @@ nodeMainSpan p@{ dispatch, folderOpen, frontends, session } = R.createElement el
}
[ nodeText { isSelected: (mCorpusId mCurrentRoute) == (Just id)
, name: name' props} ]
, Popover.popover {} [
, Popover.popover { open: fst popoverOpen
, onClose: \_ -> snd popoverOpen $ const false
, onOpen: \_ -> snd popoverOpen $ const true } [
popOverIcon true
, mNodePopupView props showBox
]
...
...
src/Gargantext/Utils/Popover.purs
View file @
66ad76db
module Gargantext.Utils.Popover where
import Data.Nullable (Nullable)
import DOM.Simple.Types (Element)
import Effect (Effect)
import Reactix as R
import Type.Row as TR
import Gargantext.Prelude
type Props = ()
type Props =
(
open :: Boolean
, onClose :: Unit -> Effect Unit
, onOpen :: Unit -> Effect Unit
)
foreign import popoverCpt :: R.Component Props
...
...
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