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
15eed678
Commit
15eed678
authored
2 years ago
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/425-dev-terms-page-reset' into dev
parents
8ec3b623
851ebc93
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
Search.purs
src/Gargantext/Components/NgramsTable/Search.purs
+6
-5
No files found.
src/Gargantext/Components/NgramsTable/Search.purs
View file @
15eed678
...
@@ -35,7 +35,7 @@ searchInputCpt = here.component "searchInput" cpt
...
@@ -35,7 +35,7 @@ searchInputCpt = here.component "searchInput" cpt
pure $ R2.row
pure $ R2.row
[ H.div { className: "col-12" }
[ H.div { className: "col-12" }
[ H.div { className: "input-group" }
[ H.div { className: "input-group" }
[ searchFieldInput { inputRef, searchQuery } []
[ searchFieldInput { inputRef, searchQuery
, params
} []
, searchButton { inputRef, searchQuery, params } []
, searchButton { inputRef, searchQuery, params } []
]
]
]
]
...
@@ -123,14 +123,14 @@ searchButtonCpt = here.component "searchButton" cpt where
...
@@ -123,14 +123,14 @@ searchButtonCpt = here.component "searchButton" cpt where
type SearchFieldInputProps =
type SearchFieldInputProps =
( inputRef :: R.Ref (Nullable DOM.Element)
( inputRef :: R.Ref (Nullable DOM.Element)
, searchQuery :: T.Box String
, searchQuery :: T.Box String
, params :: T.Box Params
)
)
searchFieldInput :: R2.Component SearchFieldInputProps
searchFieldInput :: R2.Component SearchFieldInputProps
searchFieldInput = R.createElement searchFieldInputCpt
searchFieldInput = R.createElement searchFieldInputCpt
searchFieldInputCpt :: R.Component SearchFieldInputProps
searchFieldInputCpt :: R.Component SearchFieldInputProps
searchFieldInputCpt = here.component "searchFieldInput" cpt where
searchFieldInputCpt = here.component "searchFieldInput" cpt where
cpt { inputRef, searchQuery } _ = do
cpt { inputRef, searchQuery, params } _ = do
pure $ H.input { className: "form-control"
pure $ H.input { className: "form-control"
-- , defaultValue: searchQuery'
-- , defaultValue: searchQuery'
, name: "search"
, name: "search"
...
@@ -142,7 +142,8 @@ searchFieldInputCpt = here.component "searchFieldInput" cpt where
...
@@ -142,7 +142,8 @@ searchFieldInputCpt = here.component "searchFieldInput" cpt where
where
where
onKeyPress e = do
onKeyPress e = do
char <- R2.keyCode e
char <- R2.keyCode e
if char == 13 then
if char == 13 then do
T.write_ (R2.getInputValue inputRef) searchQuery
_ <- T.write_ (R2.getInputValue inputRef) searchQuery
changePage 1 params
else
else
pure unit
pure unit
This diff is collapsed.
Click to expand it.
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