From a6a381fa126da17d5b56795e0ee5f811f67ee802 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Tue, 27 Aug 2024 08:30:09 -0600 Subject: [PATCH] unselect LHN item if custom query --- src/pages/Search/SearchTypeMenu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Search/SearchTypeMenu.tsx b/src/pages/Search/SearchTypeMenu.tsx index a2d84209114b..c434bf346592 100644 --- a/src/pages/Search/SearchTypeMenu.tsx +++ b/src/pages/Search/SearchTypeMenu.tsx @@ -56,7 +56,7 @@ function SearchTypeMenu({queryJSON, isCustomQuery}: SearchTypeMenuProps) { route: ROUTES.SEARCH_CENTRAL_PANE.getRoute({query: SearchUtils.buildCannedSearchQuery(CONST.SEARCH.DATA_TYPES.TRIP, CONST.SEARCH.STATUS.TRIP.ALL)}), }, ]; - const activeItemIndex = typeMenuItems.findIndex((item) => item.type === type); + const activeItemIndex = isCustomQuery ? -1 : typeMenuItems.findIndex((item) => item.type === type); if (shouldUseNarrowLayout) { const title = isCustomQuery ? SearchUtils.getSearchHeaderTitle(queryJSON) : undefined;