Commit 631124aa authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge branch 'dev-doc-table-columns' into dev

parents 729f7840 e50d6c48
...@@ -208,13 +208,12 @@ searchBar (query /\ setQuery) = R.createElement el {} [] ...@@ -208,13 +208,12 @@ searchBar (query /\ setQuery) = R.createElement el {} []
[ H.input { type: "text" [ H.input { type: "text"
, className: "form-control" , className: "form-control"
, on: {change: onSearchChange queryText, keyUp: onSearchKeyup queryText} , on: {change: onSearchChange queryText, keyUp: onSearchKeyup queryText}
, placeholder: query} , placeholder: query
, defaultValue: query}
] ]
, H.div {className: "col col-md-1"} , H.div {className: "col col-md-1"}
[ H.button { type: "submit" [ searchButton queryText
, className: "btn btn-default" , if query /= "" then clearButton else H.div {} []
, on: {click: onSearchClick queryText}}
[ H.text "Search" ]
] ]
] ]
...@@ -229,9 +228,16 @@ searchBar (query /\ setQuery) = R.createElement el {} [] ...@@ -229,9 +228,16 @@ searchBar (query /\ setQuery) = R.createElement el {} []
else else
pure $ unit pure $ unit
onSearchClick :: forall e. R.State Query -> e -> Effect Unit searchButton (queryText /\ _) =
onSearchClick (queryText /\ _) = \e -> H.button { type: "submit"
setQuery $ const queryText , className: "btn btn-default"
, on: {click: \e -> setQuery $ const queryText}}
[ H.span {className: "glyphicon glyphicon-search"} [] ]
clearButton =
H.button { className: "btn btn-danger"
, on: {click: \e -> setQuery $ const ""}}
[ H.span {className: "glyphicon glyphicon-remove"} [] ]
mock :: Boolean mock :: Boolean
mock = false mock = false
......
...@@ -23,4 +23,4 @@ layout :: Spec {} {nodeId :: Int} Void ...@@ -23,4 +23,4 @@ layout :: Spec {} {nodeId :: Int} Void
layout = R2.elSpec $ R.hooksComponent "CorpusLoader" cpt layout = R2.elSpec $ R.hooksComponent "CorpusLoader" cpt
where where
cpt {nodeId} _children = do cpt {nodeId} _children = do
pure $ H.div {} [H.text "Empty page"] pure $ H.div {} [H.text "Soon: corpus synthesis here (when all others charts/featurs will be stabilized)."]
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