diff --git a/frontend/src/scenes/insights/filters/ActionFilter/entityFilterLogic.ts b/frontend/src/scenes/insights/filters/ActionFilter/entityFilterLogic.ts index c743a8bf4848e..9614c49c7542a 100644 --- a/frontend/src/scenes/insights/filters/ActionFilter/entityFilterLogic.ts +++ b/frontend/src/scenes/insights/filters/ActionFilter/entityFilterLogic.ts @@ -13,7 +13,6 @@ import { EntityType, EntityTypes, FilterType, - InsightShortId, } from '~/types' import type { entityFilterLogicType } from './entityFilterLogicType' @@ -73,19 +72,9 @@ export const entityFilterLogic = kea([ props({} as EntityFilterProps), key((props) => props.typeKey), path((key) => ['scenes', 'insights', 'ActionFilter', 'entityFilterLogic', key]), - connect((props: EntityFilterProps) => ({ + connect({ logic: [eventUsageLogic], - actions: [ - insightDataLogic({ - dashboardItemId: props.typeKey as InsightShortId, - // this can be mounted in replay filters - // in which case there's not really an insightDataLogic to mount - // disable attempts to load data that will never work - doNotLoad: props.typeKey === 'session-recordings', - }), - ['loadData'], - ], - })), + }), actions({ selectFilter: (filter: EntityFilter | ActionFilter | null) => ({ filter }), updateFilterMath: ( @@ -193,7 +182,10 @@ export const entityFilterLogic = kea([ await breakpoint(100) - actions.loadData(true) + const dataLogic = insightDataLogic.findMounted({ + dashboardItemId: props.typeKey, + }) + dataLogic?.actions?.loadData(true) }, hideModal: () => { actions.selectFilter(null)