Skip to content

Commit

Permalink
fixes cost-surface search
Browse files Browse the repository at this point in the history
  • Loading branch information
andresgnlez committed Oct 31, 2023
1 parent 2598f69 commit 66a341d
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,13 @@ const InventoryPanelCostSurface = ({ noData: noDataMessage }: { noData: string }
break;
}

return sortedData.filter((cs) =>
cs.name.toLocaleLowerCase().includes(search?.toLocaleLowerCase())
);
if (search) {
return sortedData.filter((cs) =>
cs.name.toLocaleLowerCase().includes(search?.toLocaleLowerCase())
);
}

return sortedData;
}, [filters, allProjectCostSurfacesQuery.data, search]);

const costSurfaceIds = filteredData?.map((cs) => cs.id);
Expand Down

1 comment on commit 66a341d

@vercel
Copy link

@vercel vercel bot commented on 66a341d Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

marxan – ./

marxan-git-develop-vizzuality1.vercel.app
marxan-vizzuality1.vercel.app
marxan23.vercel.app

Please sign in to comment.