Skip to content

Commit

Permalink
fix: flatten beds array before filtering (#1388)
Browse files Browse the repository at this point in the history
  • Loading branch information
amosmachora authored Nov 27, 2024
1 parent cf778ee commit c8d3f06
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const BedAdministrationTable: React.FC = () => {
const { results, currentPage, totalPages, goTo } = usePagination(
filterOption === 'ALL'
? bedsGroupedByLocation
: bedsGroupedByLocation.filter((bed) => bed.status === filterOption) ?? [],
: bedsGroupedByLocation.flat().filter((bed) => bed.status === filterOption) ?? [],
pageSize,
);

Expand Down

0 comments on commit c8d3f06

Please sign in to comment.