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
7
Merge Requests
7
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
b069e00a
Commit
b069e00a
authored
Nov 07, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FOREST][FIX] Search form fix bug all select.
parent
f2addfc7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
SearchField.purs
src/Gargantext/Components/Search/SearchField.purs
+8
-4
No files found.
src/Gargantext/Components/Search/SearchField.purs
View file @
b069e00a
...
@@ -9,7 +9,7 @@ import Data.Tuple.Nested ((/\))
...
@@ -9,7 +9,7 @@ import Data.Tuple.Nested ((/\))
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
import FFI.Simple ((..))
import FFI.Simple ((..))
import Reactix as R
import Reactix as R
import Reactix.DOM.HTML (text, button, div, input, span, ul, li, a, option, text)
import Reactix.DOM.HTML (text, button, div, input, span, ul, li, a, option, text
, i
)
import Gargantext.Components.Search.Types -- (Database(..), readDatabase, Lang(..), readLang, Org(..), readOrg, allOrgs, allIMTorgs, HAL_Filters(..), IMT_org(..))
import Gargantext.Components.Search.Types -- (Database(..), readDatabase, Lang(..), readLang, Org(..), readOrg, allOrgs, allIMTorgs, HAL_Filters(..), IMT_org(..))
select :: forall props.
select :: forall props.
...
@@ -83,7 +83,9 @@ searchFieldComponent = R.memo (R.hooksComponent "SearchField" cpt) hasChanged
...
@@ -83,7 +83,9 @@ searchFieldComponent = R.memo (R.hooksComponent "SearchField" cpt) hasChanged
$ updateFilter org' curFilters
$ updateFilter org' curFilters
}
}
}
}
, text $ " " <> show org'
, if org' == All_IMT
then i {} [text $ " " <> show org']
else text $ " " <> show org'
]
]
) allIMTorgs
) allIMTorgs
, filterInput fi
, filterInput fi
...
@@ -113,7 +115,7 @@ isInFilters org (Just (HAL_IMT { imtOrgs })) = Set.member org imtOrgs
...
@@ -113,7 +115,7 @@ isInFilters org (Just (HAL_IMT { imtOrgs })) = Set.member org imtOrgs
isInFilters _ _ = false
isInFilters _ _ = false
updateFilter :: IMT_org -> Maybe HAL_Filters -> Maybe HAL_Filters
updateFilter :: IMT_org -> Maybe HAL_Filters -> Maybe HAL_Filters
updateFilter org (Just (HAL_IMT {
imtOrgs})) =
updateFilter org (Just (HAL_IMT {imtOrgs})) =
Just $ HAL_IMT { imtOrgs: imtOrgs'
Just $ HAL_IMT { imtOrgs: imtOrgs'
, structIds: Set.empty
, structIds: Set.empty
}
}
...
@@ -130,7 +132,9 @@ updateFilter org (Just (HAL_IMT { imtOrgs})) =
...
@@ -130,7 +132,9 @@ updateFilter org (Just (HAL_IMT { imtOrgs})) =
updateFilter org _ = Just $ HAL_IMT { imtOrgs: imtOrgs', structIds: Set.empty}
updateFilter org _ = Just $ HAL_IMT { imtOrgs: imtOrgs', structIds: Set.empty}
where
where
imtOrgs' = Set.fromFoldable [org]
imtOrgs' = if org == All_IMT
then Set.fromFoldable allIMTorgs
else Set.fromFoldable [org]
databaseInput :: R.State (Maybe Database)
databaseInput :: R.State (Maybe Database)
...
...
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