Skip to content

Commit

Permalink
Make sure selected case 'all' shows all questions
Browse files Browse the repository at this point in the history
Filtering condition 'isInFilter()' extended by the case 'all', similar
to existing condition '-1'.

Fixes #92
  • Loading branch information
Kha committed Apr 8, 2021
1 parent 6a943d2 commit 91b28a9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export default class QuestionBox extends React.Component {
}

isInFilter (item) {
return (this.state.category === '-1' || this.state.category === item.category) &&
const { category } = this.state
return (category === '-1' || category === django.gettext('all') || category === item.category) &&
(!this.state.displayOnShortlist || item.is_on_shortlist) && (!this.state.displayNotHiddenOnly || !item.is_hidden)
}

Expand Down

0 comments on commit 91b28a9

Please sign in to comment.