mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 09:14:46 +01:00
Fixes lifecycle & stickiness selecting action/events (#4249)
This commit is contained in:
parent
c4f8abbdfc
commit
3dac5f5157
@ -20,6 +20,8 @@ export enum ViewType {
|
||||
PATHS = 'PATHS',
|
||||
}
|
||||
|
||||
export const TRENDS_BASED_INSIGHTS = ['TRENDS', 'STICKINESS', 'LIFECYCLE'] // Insights that are based on the same `Trends` components
|
||||
|
||||
/*
|
||||
InsightLogic maintains state for changing between insight features
|
||||
This includes handling the urls and view state
|
||||
|
@ -14,7 +14,7 @@ import {
|
||||
ACTION_TYPE,
|
||||
ShownAsValue,
|
||||
} from 'lib/constants'
|
||||
import { ViewType, insightLogic, defaultFilterTestAccounts } from '../insights/insightLogic'
|
||||
import { ViewType, insightLogic, defaultFilterTestAccounts, TRENDS_BASED_INSIGHTS } from '../insights/insightLogic'
|
||||
import { insightHistoryLogic } from '../insights/InsightHistoryPanel/insightHistoryLogic'
|
||||
import { SESSIONS_WITH_RECORDINGS_FILTER } from 'scenes/sessions/filters/constants'
|
||||
import { ActionFilter, ActionType, FilterType, PersonType, PropertyFilter, TrendResult, EntityTypes } from '~/types'
|
||||
@ -234,7 +234,7 @@ export const trendsLogic = kea<
|
||||
>,
|
||||
{
|
||||
setFilters: (state, { filters, mergeFilters }) => {
|
||||
const newState = state?.insight === ViewType.TRENDS ? state : {}
|
||||
const newState = state?.insight && TRENDS_BASED_INSIGHTS.includes(state.insight) ? state : {}
|
||||
return cleanFilters({
|
||||
...(mergeFilters ? newState : {}),
|
||||
...filters,
|
||||
|
Loading…
Reference in New Issue
Block a user