diff --git a/src/components/controls/filter.js b/src/components/controls/filter.js index afeca92ef..0b8ddc789 100644 --- a/src/components/controls/filter.js +++ b/src/components/controls/filter.js @@ -98,7 +98,10 @@ class FilterData extends React.Component { return { filterName, displayName: filterBadgeDisplayName(n, this.getFilterTitle(filterName)), - remove: () => {this.props.dispatch(applyFilter("set", filterName, []));} + anyFiltersActive: () => this.props.activeFilters[filterName].filter((f) => f.active).length>0, + remove: () => {this.props.dispatch(applyFilter("set", filterName, []));}, + activate: () => {this.props.dispatch(applyFilter("add", filterName, this.props.activeFilters[filterName].map((f) => f.value)));}, + inactivate: () => {this.props.dispatch(applyFilter("inactivate", filterName, this.props.activeFilters[filterName].map((f) => f.value)));} }; }); } @@ -138,9 +141,12 @@ class FilterData extends React.Component { {inUseFilters.map((filter) => (