Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skipping initial pipeline call when search keyword is present #1331

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/view/container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to skip this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look into the referenced issue #1330 that has more details to it. I see that you pushed fixes related to that already. I didn't get a chance to validate the new build, but if #1330 is already fixed in your other fixes then we don't need this PR.

}
config.pipeline.on('updated', processPipeline);

return () => config.pipeline.off('updated', processPipeline);
Expand Down