diff --git a/frontend/src/scenes/trends/persons-modal/personsModalLogic.ts b/frontend/src/scenes/trends/persons-modal/personsModalLogic.ts index c7358c996a2b7..b8a54b03094d2 100644 --- a/frontend/src/scenes/trends/persons-modal/personsModalLogic.ts +++ b/frontend/src/scenes/trends/persons-modal/personsModalLogic.ts @@ -1,5 +1,5 @@ import { lemonToast } from '@posthog/lemon-ui' -import { actions, afterMount, connect, kea, listeners, path, props, reducers, selectors } from 'kea' +import { actions, afterMount, connect, kea, listeners, path, props, propsChanged, reducers, selectors } from 'kea' import { loaders } from 'kea-loaders' import { router, urlToAction } from 'kea-router' import api from 'lib/api' @@ -310,4 +310,10 @@ export const personsModalLogic = kea([ } }, })), + + propsChanged(({ props, actions }, oldProps) => { + if (props.url !== oldProps.url) { + actions.loadActors({ query: props.query, url: props.url, clear: true }) + } + }), ])