File tree 1 file changed +7
-0
lines changed
src/discussions/learners/learner-post-filter-bar
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { useParams } from 'react-router-dom';
7
7
import { sendTrackEvent } from '@edx/frontend-platform/analytics' ;
8
8
9
9
import FilterBar from '../../../components/FilterBar' ;
10
+ import { PostsStatusFilter , ThreadType } from '../../../data/constants' ;
10
11
import { selectCourseCohorts } from '../../cohorts/data/selectors' ;
11
12
import { fetchCourseCohorts } from '../../cohorts/data/thunks' ;
12
13
import { selectUserHasModerationPrivileges , selectUserIsGroupTa } from '../../data/selectors' ;
@@ -58,10 +59,16 @@ const LearnerPostFilterBar = () => {
58
59
}
59
60
} else if ( name === 'status' ) {
60
61
if ( postFilter . status !== value ) {
62
+ const postType = ( value === PostsStatusFilter . UNANSWERED && ThreadType . QUESTION )
63
+ || ( value === PostsStatusFilter . UNRESPONDED && ThreadType . DISCUSSION )
64
+ || postFilter . postType ;
65
+
61
66
dispatch ( setPostFilter ( {
62
67
...postFilter ,
68
+ postType,
63
69
status : value ,
64
70
} ) ) ;
71
+
65
72
filterContentEventProperties . statusFilter = value ;
66
73
}
67
74
} else if ( name === 'orderBy' ) {
You can’t perform that action at this time.
0 commit comments