Commit dade1369 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FEAT] Search filter.

parent 55d5f541
...@@ -5,7 +5,7 @@ import Data.Array (fold) ...@@ -5,7 +5,7 @@ import Data.Array (fold)
import Network.HTTP.Affjax (AJAX) import Network.HTTP.Affjax (AJAX)
import Prelude (id, void) import Prelude (id, void)
import Prelude hiding (div) import Prelude hiding (div)
import React.DOM (div, h3, hr, i, p, span, text) import React.DOM (div, h3, hr, i, p, span, text, input)
import React.DOM.Props (className, style) import React.DOM.Props (className, style)
import Tabview as Tab import Tabview as Tab
import Thermite (PerformAction, Render, Spec, defaultPerformAction, modifyState, simpleSpec) import Thermite (PerformAction, Render, Spec, defaultPerformAction, modifyState, simpleSpec)
...@@ -18,8 +18,9 @@ initialState :: State ...@@ -18,8 +18,9 @@ initialState :: State
initialState = Tab.initialState initialState = Tab.initialState
spec' :: forall eff props. Spec (dom :: DOM, console :: CONSOLE, ajax :: AJAX | eff) Tab.State props Tab.Action spec' :: forall eff props. Spec (dom :: DOM, console :: CONSOLE, ajax :: AJAX | eff) Tab.State props Tab.Action
spec' = fold [corpusAnalysisSpec, Tab.tab1] spec' = fold [ corpusAnalysisSpec
, Tab.tab1
]
corpusAnalysisSpec :: forall props eff . Spec eff Tab.State props Tab.Action corpusAnalysisSpec :: forall props eff . Spec eff Tab.State props Tab.Action
corpusAnalysisSpec = simpleSpec defaultPerformAction render corpusAnalysisSpec = simpleSpec defaultPerformAction render
......
...@@ -29,7 +29,7 @@ import React as R ...@@ -29,7 +29,7 @@ import React as R
import React.DOM (a, b, b', br', div, h3, i, input, li, option, select, span, table, tbody, td, text, thead, th, tr, ul, nav) import React.DOM (a, b, b', br', div, h3, i, input, li, option, select, span, table, tbody, td, text, thead, th, tr, ul, nav)
import React.DOM.Props (Props, _type, className, href, onChange, onClick, selected, value, scope, _id, role, _data, aria) import React.DOM.Props (Props, _type, className, href, onChange, onClick, selected, value, scope, _id, role, _data, aria)
import ReactDOM as RDOM import ReactDOM as RDOM
import Thermite (PerformAction, Render, Spec, cotransform, createReactSpec, modifyState, simpleSpec) import Thermite (PerformAction, Render, Spec, cotransform, createReactSpec, defaultPerformAction, modifyState, simpleSpec)
import Unsafe.Coerce (unsafeCoerce) import Unsafe.Coerce (unsafeCoerce)
main :: forall e. Eff (dom:: DOM, console :: CONSOLE, ajax :: AJAX | e) Unit main :: forall e. Eff (dom:: DOM, console :: CONSOLE, ajax :: AJAX | e) Unit
...@@ -96,6 +96,12 @@ instance decodeResponse :: DecodeJson Response where ...@@ -96,6 +96,12 @@ instance decodeResponse :: DecodeJson Response where
filterSpec :: Spec _ State _ Action
filterSpec = simpleSpec defaultPerformAction render
where
render :: Render State _ Action
render dispatch _ state _ = [div [] [text "Filter ", input [] []]]
layoutDocview :: Spec _ State _ Action layoutDocview :: Spec _ State _ Action
layoutDocview = simpleSpec performAction render layoutDocview = simpleSpec performAction render
...@@ -107,13 +113,12 @@ layoutDocview = simpleSpec performAction render ...@@ -107,13 +113,12 @@ layoutDocview = simpleSpec performAction render
[ [
div [className "col-md-12"] div [className "col-md-12"]
[ p'' [ p''
, text "Filter ", input [] []
, h3 [] [text "Chart Title"] , h3 [] [text "Chart Title"]
, histogram , histogram
, p'' , p''
, br' [] , br' []
, div [] [ b [] [text d.title] , div [] [ b [] [text d.title]
, text " Filter "
, input [] []
, sizeDD d.pageSize dispatch , sizeDD d.pageSize dispatch
, textDescription d.currentPage d.pageSize d.totalRecords , textDescription d.currentPage d.pageSize d.totalRecords
, pagination dispatch d.totalPages d.currentPage , pagination dispatch d.totalPages d.currentPage
......
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