File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/discussions/learners/learner-post-filter-bar Expand file tree Collapse file tree 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';
77import { sendTrackEvent } from '@edx/frontend-platform/analytics' ;
88
99import FilterBar from '../../../components/FilterBar' ;
10+ import { PostsStatusFilter , ThreadType } from '../../../data/constants' ;
1011import { selectCourseCohorts } from '../../cohorts/data/selectors' ;
1112import { fetchCourseCohorts } from '../../cohorts/data/thunks' ;
1213import { selectUserHasModerationPrivileges , selectUserIsGroupTa } from '../../data/selectors' ;
@@ -58,10 +59,16 @@ const LearnerPostFilterBar = () => {
5859 }
5960 } else if ( name === 'status' ) {
6061 if ( postFilter . status !== value ) {
62+ const postType = ( value === PostsStatusFilter . UNANSWERED && ThreadType . QUESTION )
63+ || ( value === PostsStatusFilter . UNRESPONDED && ThreadType . DISCUSSION )
64+ || postFilter . postType ;
65+
6166 dispatch ( setPostFilter ( {
6267 ...postFilter ,
68+ postType,
6369 status : value ,
6470 } ) ) ;
71+
6572 filterContentEventProperties . statusFilter = value ;
6673 }
6774 } else if ( name === 'orderBy' ) {
You can’t perform that action at this time.
0 commit comments