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

[FIX] Icon + placeHolder

parent b1f181e8
......@@ -88,7 +88,7 @@ shareNodeInnerCpt :: R.Component ShareNodeInner
shareNodeInnerCpt = here.component "shareNodeInner" cpt
where
cpt { dispatch, completions } _ = do
state <- T.useBox "username"
state <- T.useBox ""
text' /\ text <- R2.useBox' ""
pure $ Tools.panel
......@@ -98,7 +98,8 @@ shareNodeInnerCpt = here.component "shareNodeInner" cpt
, classes: "d-flex align-items-center"
, autocompleteSearch
, onAutocompleteClick
, text }
, text
, placeHolder: "username or email"}
] (H.div {} [H.text text'])
where
autocompleteSearch input = nub $ filter (contains (Pattern input)) completions
......
......@@ -135,6 +135,7 @@ type Props' =
, boxAction :: String -> Action
, state :: T.Box String
, text :: T.Box String
, placeHolder :: String
)
inputWithAutocomplete' :: R2.Leaf Props'
......@@ -148,7 +149,8 @@ inputWithAutocompleteCpt' = here.component "inputWithAutocomplete" cpt
, dispatch
, boxAction
, state
, text } _ = do
, text
, placeHolder } _ = do
-- States
state' <- T.useLive T.unequal state
containerRef <- R.useRef null
......@@ -168,6 +170,7 @@ inputWithAutocompleteCpt' = here.component "inputWithAutocomplete" cpt
, ref: inputRef
, className: "form-control"
, value: state'
, placeHolder: placeHolder
, on: { focus: onFocus completions state'
, input: onInput completions
, change: onInput completions
......@@ -178,7 +181,7 @@ inputWithAutocompleteCpt' = here.component "inputWithAutocomplete" cpt
, B.iconButton
{ callback: submit state'
, title: "Submit"
, name: "plus"
, name: "send"
, elevation: Level1
}
]
......
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