diff --git a/app/layout/project/sidebar/project/inventory-panel/cost-surfaces/index.tsx b/app/layout/project/sidebar/project/inventory-panel/cost-surfaces/index.tsx index 21d7b8ad2b..4c024a09ac 100644 --- a/app/layout/project/sidebar/project/inventory-panel/cost-surfaces/index.tsx +++ b/app/layout/project/sidebar/project/inventory-panel/cost-surfaces/index.tsx @@ -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);