Verified Commit 78a3bfc0 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch 'dev' into 544-dev-term-table-suggestion-fix-for-children

parents 8cf8c9ec 9f603cac
{ {
"name": "Gargantext", "name": "Gargantext",
"version": "0.0.6.9.9.4.2", "version": "0.0.6.9.9.4.3",
"scripts": { "scripts": {
"generate-purs-packages-nix": "./nix/generate-purs-packages.nix", "generate-purs-packages-nix": "./nix/generate-purs-packages.nix",
"generate-psc-packages-nix": "./nix/generate-packages-json.bash", "generate-psc-packages-nix": "./nix/generate-packages-json.bash",
......
...@@ -39,7 +39,7 @@ here = R2.here "Gargantext.Components.Forest.Tree.Node.Action.Search.SearchField ...@@ -39,7 +39,7 @@ here = R2.here "Gargantext.Components.Forest.Tree.Node.Action.Search.SearchField
defaultSearch :: Search defaultSearch :: Search
defaultSearch = { databases : Empty defaultSearch = { databases : Empty
, datafield : Nothing , datafield : Just (External Empty)
, node_id : Nothing , node_id : Nothing
, lang : Nothing , lang : Nothing
, term : "" , term : ""
...@@ -350,6 +350,8 @@ databaseInputCpt = here.component "databaseInput" cpt ...@@ -350,6 +350,8 @@ databaseInputCpt = here.component "databaseInput" cpt
(Just (External x)) -> Just x (Just (External x)) -> Just x
_ -> Nothing _ -> Nothing
dbInputValue = fromMaybe "" $ dbToInputValue <$> db
liItem :: Database -> R.Element liItem :: Database -> R.Element
liItem db' = H.option { className : "text-primary center" liItem db' = H.option { className : "text-primary center"
, value: dbToInputValue db' } [ H.text (show db') ] , value: dbToInputValue db' } [ H.text (show db') ]
...@@ -377,14 +379,12 @@ databaseInputCpt = here.component "databaseInput" cpt ...@@ -377,14 +379,12 @@ databaseInputCpt = here.component "databaseInput" cpt
H.div { className: "form-group" } H.div { className: "form-group" }
[ H.div {className: "text-primary center"} [ H.text "in database" ] [ H.div {className: "text-primary center"} [ H.text "in database" ]
, R2.select { className: "form-control" , R2.select { className: "form-control"
, defaultValue: defaultValue search'.datafield , defaultValue: dbInputValue
, on: { change } , on: { change }
} (liItem <$> databases) } (liItem <$> databases)
, H.div {className:"center"} [ H.text $ maybe "" doc db ] , H.div {className:"center"} [ H.text $ maybe "" doc db ]
] ]
defaultValue datafield = show $ maybe Empty datafield2database datafield
type PubmedInputProps = ( type PubmedInputProps = (
search :: T.Box Search search :: T.Box Search
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment