Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
inventory-frontend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Jira
Jira
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
coding-brunch-hh
inventory-frontend
Commits
29f91868
Commit
29f91868
authored
Aug 02, 2018
by
Martin Fahl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makes filter case insensitive
parent
e070eb7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
src/container/InventoryList/InventoryListContainer.js
src/container/InventoryList/InventoryListContainer.js
+1
-1
src/container/Item/Item.js
src/container/Item/Item.js
+7
-6
No files found.
src/container/InventoryList/InventoryListContainer.js
View file @
29f91868
...
...
@@ -7,7 +7,7 @@ const getVisibleItems = (items, filterTerm) => {
if
(
filterTerm
===
undefined
)
{
return
items
;
}
else
{
return
items
.
filter
(
item
=>
item
.
name
.
includes
(
filterTerm
));
return
items
.
filter
(
item
=>
item
.
name
.
toLowerCase
().
includes
(
filterTerm
.
toLowerCase
()
));
}
}
...
...
src/container/Item/Item.js
View file @
29f91868
import
React
,
{
Component
}
from
"
react
"
;
import
PropTypes
from
"
prop-types
"
;
import
{
ListGroupItem
,
Badge
,
Fa
}
from
"
mdbreact
"
;
import
{
Row
,
Col
}
from
"
mdbreact
"
;
export
class
Item
extends
Component
{
constructor
(
props
)
{
...
...
@@ -22,20 +23,20 @@ export class Item extends Component {
render
()
{
return
(
<
ListGroupItem
>
<
div
className
=
"
row
"
>
<
Row
>
<
div
className
=
"
col
"
>
<
Col
md
=
"
6
"
xs
=
"
4
"
>
{
this
.
props
.
name
}
<
/
div
>
<
/
Col
>
<
div
className
=
"
col
"
>
<
Col
md
=
"
6
"
xs
=
"
8
"
>
<
Badge
color
=
"
secondary
"
className
=
"
ml-1 mr-1
"
onClick
=
{
this
.
increment
}
><
Fa
icon
=
"
plus-square
"
aria
-
hidden
=
"
true
"
/><
/Badge
>
<
Badge
color
=
"
default
"
className
=
"
ml-1 mr-1
"
pill
>
{
this
.
state
.
counter
}
<
/Badge
>
<
Badge
color
=
"
secondary
"
className
=
"
ml-1 mr-1
"
onClick
=
{
this
.
decrement
}
><
Fa
icon
=
"
minus-square
"
aria
-
hidden
=
"
true
"
/><
/Badge
>
<
Badge
color
=
"
danger
"
className
=
"
ml-1 mr-1
"
><
Fa
icon
=
"
trash
"
aria
-
hidden
=
"
true
"
/><
/Badge
>
<
/
div
>
<
/
Col
>
<
/
div
>
<
/
Row
>
<
/ListGroupItem
>
...
...
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