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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Grégoire Locqueville
purescript-gargantext
Commits
b8122ab3
Commit
b8122ab3
authored
Mar 14, 2023
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Icon + placeHolder
parent
b1f181e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
Share.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Share.purs
+3
-2
InputWithAutocomplete.purs
src/Gargantext/Components/InputWithAutocomplete.purs
+5
-2
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Share.purs
View file @
b8122ab3
...
...
@@ -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
...
...
src/Gargantext/Components/InputWithAutocomplete.purs
View file @
b8122ab3
...
...
@@ -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
}
]
...
...
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