Skip to content

Commit

Permalink
fix filters for multiple choice questions
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasheriques committed Feb 13, 2025
1 parent 183c1eb commit 204f715
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions frontend/src/scenes/surveys/SurveyAnswerFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const OPERATOR_OPTIONS: Record<SurveyQuestionType, OperatorOption[]> = {
{ label: allOperatorsMapping[PropertyOperator.NotIContains], value: PropertyOperator.NotIContains },
{ label: allOperatorsMapping[PropertyOperator.Regex], value: PropertyOperator.Regex },
{ label: allOperatorsMapping[PropertyOperator.NotRegex], value: PropertyOperator.NotRegex },
{ label: allOperatorsMapping[PropertyOperator.Exact], value: PropertyOperator.Exact },
],
[SurveyQuestionType.Link]: [],
}
Expand Down Expand Up @@ -134,9 +133,7 @@ export function SurveyAnswerFilters(): JSX.Element {
placeholder={
question.type === SurveyQuestionType.Rating
? 'Enter a number'
: question.type === SurveyQuestionType.Open
? 'Enter text to match'
: 'Select values'
: 'Enter text to match'
}
/>
)}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/scenes/surveys/surveyLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const DEFAULT_OPERATORS: Record<SurveyQuestionType, { label: string; value: Prop
value: PropertyOperator.Exact,
},
[SurveyQuestionType.MultipleChoice]: {
label: allOperatorsMapping[PropertyOperator.Exact],
value: PropertyOperator.Exact,
label: allOperatorsMapping[PropertyOperator.IContains],
value: PropertyOperator.IContains,
},
[SurveyQuestionType.Link]: {
label: allOperatorsMapping[PropertyOperator.Exact],
Expand Down

0 comments on commit 204f715

Please sign in to comment.