Skip to content

Commit

Permalink
feat(earnings main filter): implement grower filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Mloweedgar committed Jan 16, 2022
1 parent 227592a commit 1d4ad15
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ function EarningsTableMainFilter(props) {
e.preventDefault();
const filtersToSubmit = { ...filter, ...mainFilter };
Object.keys(filtersToSubmit).forEach(
(k) => filtersToSubmit[k] == 'all' && delete filtersToSubmit[k]
(k) =>
(filtersToSubmit[k] == 'all' || filtersToSubmit[k] == '') &&
delete filtersToSubmit[k]
); // filter our keys we don't want to submit
setFilter(filtersToSubmit);
setIsMainFilterOpen(false);
Expand Down

0 comments on commit 1d4ad15

Please sign in to comment.