diff --git a/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx b/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx index 8c36d666fd..40605d8eee 100644 --- a/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx +++ b/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx @@ -181,11 +181,11 @@ export default function FiltersPanel({ }; const communityOps = communityFilters.filter(community => ( - !community.hidden && community.groupIds && community.groupIds.length > 0 + (!community.hidden && community.groupIds && community.groupIds.length > 0) || community.communityName === 'All' )) .map(community => ({ label: community.communityName, - value: community.groupIds[0], + value: community.communityName === 'All' ? '' : community.groupIds[0], name: community.communityName, data: getLabel(community), })); @@ -244,9 +244,9 @@ export default function FiltersPanel({ id="community-select" // onChange={selectCommunity} onChange={(value) => { - // const group = value; - // setFilterState({ ..._.clone(filterState), groups: group === '' ? [] : [group] }); - setFilterState({ ..._.clone(filterState), groups: [value] }); + const group = value; + setFilterState({ ..._.clone(filterState), groups: group === '' ? [] : [group] }); + // setFilterState({ ..._.clone(filterState), groups: [value] }); }} options={communityOps} simpleValue