Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
A
Aqbits Trace Code
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mai Thanh Cong
Aqbits Trace Code
Commits
d1814441
Commit
d1814441
authored
Jul 01, 2021
by
Mai Thanh Cong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change text in search profile
parent
08f2f3d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
src/views/IndexSections/Inputs.js
src/views/IndexSections/Inputs.js
+7
-8
No files found.
src/views/IndexSections/Inputs.js
View file @
d1814441
...
...
@@ -33,18 +33,17 @@ import {
}
from
"
reactstrap
"
;
import
{
useHistory
}
from
'
react-router-dom
'
;
import
dummyData
from
"
../../data/index.json
"
;
import
{
Routes
}
from
"
../../reoutes
"
;
const
Inputs
=
()
=>
{
const
[
searchProfile
,
setSearchProfile
]
=
useState
();
const
history
=
useHistory
();
const
handleChangeSearch
=
(
event
)
=>
{
console
.
log
(
"
change change
"
);
setSearchProfile
(
event
.
target
.
value
);
}
const
onHandleSearch
=
()
=>
{
const
onHandleSearch
=
(
event
)
=>
{
event
.
preventDefault
();
const
nameCode
=
dummyData
.
data
.
map
(
item
=>
item
.
code
);
console
.
log
(
"
nameCode
"
,
nameCode
);
const
checkSearch
=
nameCode
.
indexOf
(
searchProfile
);
...
...
@@ -64,13 +63,13 @@ const Inputs = () => {
<
section
className
=
"
section pb-0 section-components
"
>
<
Container
className
=
"
mb-5
"
>
{
/* Inputs */
}
<
h3
className
=
"
h4 text-success font-weight-bold mb-4 text-center
"
>
Search
profile
<
/h3
>
<
h3
className
=
"
h4 text-success font-weight-bold mb-4 text-center
"
>
Tra
c
ứ
u
th
ô
ng
tin
<
/h3
>
{
/* <div className="mb-3">
<small className="text-uppercase font-weight-bold">
Form controls
</small>
</div> */
}
<
Form
className
=
"
justify-content-center
"
>
<
Form
className
=
"
justify-content-center
"
onSubmit
=
{
onHandleSearch
}
>
<
FormGroup
// className={classnames({
// focused: this.state.searchFocused
...
...
@@ -83,7 +82,7 @@ const Inputs = () => {
<
/InputGroupText
>
<
/InputGroupAddon
>
<
Input
placeholder
=
"
Search
"
placeholder
=
"
Tìm kiếm
"
type
=
"
text
"
// onFocus={e => this.setState({ searchFocused: true })}
// onBlur={e => this.setState({ searchFocused: false })}
...
...
@@ -93,8 +92,8 @@ const Inputs = () => {
<
/InputGroup
>
<
/FormGroup
>
<
div
className
=
"
text-center
"
>
<
Button
className
=
"
btn-1
"
color
=
"
primary
"
type
=
"
button
"
onClick
=
{
onHandleSearch
}
>
Search
<
Button
className
=
"
btn-1
"
color
=
"
primary
"
type
=
"
submit
"
>
T
ì
m
ki
ế
m
<
/Button
>
<
/div
>
<
/Form
>
...
...
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