From 12c058307f99b68ac073a8d1baa3da072acfb58b Mon Sep 17 00:00:00 2001 From: mnsrulz Date: Wed, 8 Mar 2023 17:58:44 -0500 Subject: [PATCH] skipping initial pipeline call when search keyword is present --- src/view/container.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/view/container.tsx b/src/view/container.tsx index 92b6dd58..0a514500 100644 --- a/src/view/container.tsx +++ b/src/view/container.tsx @@ -10,6 +10,7 @@ import * as actions from './actions'; import { useStore } from '../hooks/useStore'; import useSelector from '../../src/hooks/useSelector'; import { useConfig } from '../../src/hooks/useConfig'; +import { SearchConfig } from '../../src/view/plugin/search/search'; export function Container() { const config = useConfig(); @@ -25,7 +26,11 @@ export function Container() { // is available in the state dispatch(actions.SetHeader(config.header)); - processPipeline(); + if ((config.search as SearchConfig)?.keyword) { + //skipping initial pipeline as search keyword is present and search plugin will handle the initial data laod + } else { + processPipeline(); + } config.pipeline.on('updated', processPipeline); return () => config.pipeline.off('updated', processPipeline);