From 6ce5944eb5a3d35bfc3f7c2307792a441c9dab2f Mon Sep 17 00:00:00 2001 From: 2s2e Date: Fri, 24 May 2024 11:44:52 -0700 Subject: [PATCH] Zip code filtering appends zip codes instead of overwritting what is there --- frontend/src/app/staff/vsr/page.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/staff/vsr/page.tsx b/frontend/src/app/staff/vsr/page.tsx index 496c4e0..27017d4 100644 --- a/frontend/src/app/staff/vsr/page.tsx +++ b/frontend/src/app/staff/vsr/page.tsx @@ -410,7 +410,10 @@ export default function VSRTableView() { } } } - setFilteredZipCodes(zipCodes); + //add zipCodes to filteredZipCodes and zipcodes + const combinedZipCodes = [...(filteredZipCodes ?? []), ...(zipCodes ?? [])]; + + setFilteredZipCodes(combinedZipCodes); setFilteredIncome(incomeLevel); fetchVSRs(search, zipCodes, incomeLevel, status); }}