Skip to content

Commit

Permalink
Merge pull request bruin-tennis-consulting#77 from awest25/bugfix-des…
Browse files Browse the repository at this point in the history
…elect-active-filter

Bugfix deselect active filter
  • Loading branch information
Fredenck authored Feb 14, 2024
2 parents 56820b6 + bb2b60f commit 387472b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/FilterList.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ const FilterList = ({ pointsData, filterList, setFilterList, showPercent, showCo
setFilterList([...filterList, [key, value]]);
}
}
const removeFilter = (key, value) => {
const updatedFilterList = filterList.filter(([filterKey, filterValue]) => !(filterKey === key && filterValue === value));
setFilterList(updatedFilterList);
};

//Counts points for each filter
const countFilteredPointsForValue = (key, value) => {
Expand Down

0 comments on commit 387472b

Please sign in to comment.