From bc1c95135472e0813497bfcbd5804b9ef2141cc7 Mon Sep 17 00:00:00 2001 From: Julian Bez Date: Tue, 19 Mar 2024 10:38:38 +0000 Subject: [PATCH] fix(insights): Remove connect logics for rename series (#20972) --- .../filters/ActionFilter/entityFilterLogic.ts | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) 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)