File tree 1 file changed +5
-5
lines changed
src/shared/components/challenge-listing/Filters/FiltersPanel
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 22
22
/* eslint-disable jsx-a11y/label-has-for */
23
23
24
24
import _ from 'lodash' ;
25
- import { challenge as challengeUtils } from 'topcoder-react-lib' ;
26
25
import React from 'react' ;
27
26
import PT from 'prop-types' ;
28
27
import Select from 'components/Select' ;
@@ -38,7 +37,6 @@ import DateRangePicker from '../DateRangePicker';
38
37
import style from './style.scss' ;
39
38
import UiSimpleRemove from '../../Icons/ui-simple-remove.svg' ;
40
39
41
- const Filter = challengeUtils . filter ;
42
40
43
41
export default function FiltersPanel ( {
44
42
communityFilters,
@@ -328,9 +326,10 @@ export default function FiltersPanel({
328
326
autoBlur
329
327
clearable = { false }
330
328
id = "review-type-select"
331
- onChange = {
332
- value => setFilterState ( Filter . setReviewOpportunityType ( filterState , value ) )
333
- }
329
+ onChange = { ( value ) => {
330
+ const reviewOpportunityType = value === 0 ? undefined : value ;
331
+ setFilterState ( { ..._ . clone ( filterState ) , reviewOpportunityType } ) ;
332
+ } }
334
333
options = { [
335
334
{ label : 'All' , value : 0 } , // 0 value deactivates above filter
336
335
...Object . entries ( REVIEW_OPPORTUNITY_TYPES )
@@ -434,6 +433,7 @@ export default function FiltersPanel({
434
433
endDateStart : null ,
435
434
startDateEnd : null ,
436
435
status : 'All' ,
436
+ reviewOpportunityType : undefined ,
437
437
} ) ;
438
438
selectCommunity ( defaultCommunityId ) ;
439
439
setSearchText ( '' ) ;
You can’t perform that action at this time.
0 commit comments