Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
warehouse-management
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
1
Merge Requests
1
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
Ascend
warehouse-management
Commits
4986adae
Commit
4986adae
authored
May 08, 2021
by
Darrick Yong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix formatting
parent
cb28455f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
Search.jsx
frontend/src/components/filter/Search.jsx
+3
-7
No files found.
frontend/src/components/filter/Search.jsx
View file @
4986adae
...
...
@@ -3,12 +3,10 @@ import { connect } from "react-redux";
import
Select
from
"../atoms/Select"
;
import
Input
from
"../atoms/Input"
;
import
Button
from
"../atoms/Button"
;
import
Error
from
"../atoms/Error"
;
const
Search
=
({
orders
,
setOrdersToShow
,
setFiltersOn
})
=>
{
const
[
searchInput
,
setSearchInput
]
=
useState
(
""
);
const
[
searchBy
,
setSearchBy
]
=
useState
(
""
);
const
[
error
,
setError
]
=
useState
(
""
);
const
[
inputError
,
setInputError
]
=
useState
(
false
);
const
[
byError
,
setByError
]
=
useState
(
false
);
...
...
@@ -42,14 +40,14 @@ const Search = ({ orders, setOrdersToShow, setFiltersOn }) => {
}
setSearchInput
(
""
);
setFiltersOn
(
false
);
}
}
};
const
handleInputBlur
=
(
e
)
=>
{
if
(
!
e
.
target
.
value
.
length
)
{
setInputError
(
true
);
}
}
}
;
const
handleSearchEnter
=
(
e
)
=>
{
if
(
e
.
key
===
"Enter"
)
{
...
...
@@ -82,7 +80,6 @@ const Search = ({ orders, setOrdersToShow, setFiltersOn }) => {
onKeyPress=
{
handleSearchEnter
}
/>
<
Button
className=
"search-btn"
text=
"Search"
onClick=
{
search
}
/>
{
/* {error.length ? <Error text={error} /> : null} */
}
</
div
>
);
};
...
...
@@ -91,7 +88,6 @@ const mapStateToProps = (state) => ({
orders
:
state
.
entities
.
orders
,
});
const
mapDispatchToProps
=
(
dispatch
)
=>
({
});
const
mapDispatchToProps
=
(
dispatch
)
=>
({});
export
default
connect
(
mapStateToProps
,
mapDispatchToProps
)(
Search
);
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