diff --git a/frontend/__snapshots__/scenes-app-insights--trends-line-edit--dark.png b/frontend/__snapshots__/scenes-app-insights--trends-line-edit--dark.png index 7513b6f9da17b..4c93657d5e0b6 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--trends-line-edit--dark.png and b/frontend/__snapshots__/scenes-app-insights--trends-line-edit--dark.png differ diff --git a/frontend/src/lib/components/EventSelect/EventSelect.tsx b/frontend/src/lib/components/EventSelect/EventSelect.tsx index fe4db309d44bc..0faf9490f37ba 100644 --- a/frontend/src/lib/components/EventSelect/EventSelect.tsx +++ b/frontend/src/lib/components/EventSelect/EventSelect.tsx @@ -8,10 +8,17 @@ interface EventSelectProps { onChange: (names: string[]) => void selectedEvents: string[] addElement: JSX.Element + filterGroupTypes?: TaxonomicFilterGroupType[] } -export const EventSelect = ({ onChange, selectedEvents, addElement }: EventSelectProps): JSX.Element => { +export const EventSelect = ({ + onChange, + selectedEvents, + addElement, + filterGroupTypes, +}: EventSelectProps): JSX.Element => { const [open, setOpen] = useState(false) + const eventSelectFilterGroupTypes = filterGroupTypes || [TaxonomicFilterGroupType.Events] const handleChange = (name: string): void => { onChange(Array.from(new Set(selectedEvents.concat([name])))) @@ -41,7 +48,7 @@ export const EventSelect = ({ onChange, selectedEvents, addElement }: EventSelec handleChange(value as string) setOpen(false) }} - taxonomicGroupTypes={[TaxonomicFilterGroupType.Events]} + taxonomicGroupTypes={eventSelectFilterGroupTypes} /> } > diff --git a/frontend/src/scenes/surveys/SurveyEdit.tsx b/frontend/src/scenes/surveys/SurveyEdit.tsx index 61c9f63e44617..c839daa5b7313 100644 --- a/frontend/src/scenes/surveys/SurveyEdit.tsx +++ b/frontend/src/scenes/surveys/SurveyEdit.tsx @@ -18,6 +18,7 @@ import { import { BindLogic, useActions, useValues } from 'kea' import { EventSelect } from 'lib/components/EventSelect/EventSelect' import { FlagSelector } from 'lib/components/FlagSelector' +import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types' import { FEATURE_FLAGS } from 'lib/constants' import { IconCancel } from 'lib/lemon-ui/icons' import { LemonField } from 'lib/lemon-ui/LemonField' @@ -620,8 +621,12 @@ export default function SurveyEdit(): JSX.Element { {featureFlags[FEATURE_FLAGS.SURVEYS_EVENTS] && surveysEventsAvailable && ( - + { setSurveyValue('conditions', { ...survey.conditions,