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
9085a90e
Commit
9085a90e
authored
Jun 26, 2019
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NgramsTable] fixes to annotation menu -- it closes now after selecting option
parent
8b7aae81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
AnnotatedField.purs
src/Gargantext/Components/Annotation/AnnotatedField.purs
+6
-4
No files found.
src/Gargantext/Components/Annotation/AnnotatedField.purs
View file @
9085a90e
...
@@ -17,9 +17,7 @@ import Data.Lens.At (at)
...
@@ -17,9 +17,7 @@ import Data.Lens.At (at)
import Data.Maybe ( Maybe(..), maybe, maybe' )
import Data.Maybe ( Maybe(..), maybe, maybe' )
import Data.Tuple ( Tuple(..) )
import Data.Tuple ( Tuple(..) )
import Data.Tuple.Nested ( (/\) )
import Data.Tuple.Nested ( (/\) )
import DOM.Simple.Console ( log, log2 )
import DOM.Simple.Event as DE
import DOM.Simple.Event as DE
import Effect.Class ( liftEffect )
import Effect ( Effect )
import Effect ( Effect )
import Effect.Uncurried ( mkEffectFn1 )
import Effect.Uncurried ( mkEffectFn1 )
import Reactix as R
import Reactix as R
...
@@ -58,7 +56,9 @@ annotatedFieldComponent = R.hooksComponent "AnnotatedField" cpt
...
@@ -58,7 +56,9 @@ annotatedFieldComponent = R.hooksComponent "AnnotatedField" cpt
onSelect text' (Just list) event = do
onSelect text' (Just list) event = do
let x = E.clientX event
let x = E.clientX event
y = E.clientY event
y = E.clientY event
setList = setTermList text' (Just list)
setList t = do
setTermList text' (Just list) t
setMenu Nothing
setMenu $ Just {x, y, list: Just list, menuType: SetTermListItem, setList}
setMenu $ Just {x, y, list: Just list, menuType: SetTermListItem, setList}
mapCompile (Tuple t l) = {text: t, list: l, onSelect}
mapCompile (Tuple t l) = {text: t, list: l, onSelect}
...
@@ -79,7 +79,9 @@ maybeShowMenu setMenu setTermList ngrams event = do
...
@@ -79,7 +79,9 @@ maybeShowMenu setMenu setTermList ngrams event = do
let x = E.clientX event
let x = E.clientX event
y = E.clientY event
y = E.clientY event
list = findNgram ngrams sel'
list = findNgram ngrams sel'
setList = setTermList sel' list
setList t = do
setTermList sel' list t
setMenu Nothing
E.preventDefault event
E.preventDefault event
setMenu $ Just { x, y, list, menuType: NewNgram, setList }
setMenu $ Just { x, y, list, menuType: NewNgram, setList }
Nothing -> pure unit
Nothing -> pure 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