Skip to content

Commit

Permalink
fix(simple-list): pr review feedback changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsperrine committed Sep 2, 2021
1 parent 5c1a4d3 commit 90df381
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/react/src/components/List/SimpleList/SimpleList.jsx
Expand Up @@ -129,9 +129,8 @@ const SimpleList = ({
const searchFilteredItems = items.filter((item) => {
if (item.content.value !== '' && item.content.value !== undefined) {
if (
item.content.secondaryValue !== '' &&
item.content.secondaryValue !== undefined &&
typeof item.content.secondaryValue === 'string'
typeof item.content.secondaryValue === 'string' &&
item.content.secondaryValue !== ''
) {
return (
item.content.value.toLowerCase().search(searchTerm.toLowerCase()) !== -1 ||
Expand Down Expand Up @@ -164,7 +163,7 @@ const SimpleList = ({
const maxPage = Math.ceil(numberOfItems / rowPerPage);

/**
* Then the items array updates, make sure to update the filteredItems, but also re-apply
* When the items array updates, make sure to update the filteredItems, but also re-apply
* search values if there were any.
*/
useEffect(() => {
Expand Down

0 comments on commit 90df381

Please sign in to comment.