Skip to content

Commit

Permalink
Merge pull request #50821 from Expensify/cmartins-rmSearchInWhenTyping
Browse files Browse the repository at this point in the history
Remove the Search in contextual search when typing query
  • Loading branch information
srikarparsi authored Oct 15, 2024
2 parents e8a8c53 + a3e9366 commit 429fcfa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/Search/SearchRouter/SearchRouterList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ function SearchRouterList(
const [reports] = useOnyx(ONYXKEYS.COLLECTION.REPORT);
const taxRates = getAllTaxRates();
const [cardList = {}] = useOnyx(ONYXKEYS.CARD_LIST);
const contextualQuery = `in:${reportForContextualSearch?.reportID}`;
const sections: Array<SectionListDataType<OptionData | SearchQueryItem>> = [];

if (currentQuery?.inputQuery) {
Expand All @@ -108,7 +107,7 @@ function SearchRouterList(
});
}

if (reportForContextualSearch && !currentQuery?.inputQuery?.includes(contextualQuery)) {
if (reportForContextualSearch && !currentQuery?.inputQuery) {
sections.push({
data: [
{
Expand Down

0 comments on commit 429fcfa

Please sign in to comment.