Skip to content

Commit

Permalink
adjust linking from search page
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgrzybowski committed Nov 18, 2024
1 parent 8549d41 commit b2c1ec5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -368,11 +368,14 @@ function Search({queryJSON, onSearchListScroll, isSearchScreenFocused, contentCo

if (SearchUIUtils.isReportActionListItemType(item)) {
const reportActionID = item.reportActionID;
Navigation.navigate(ROUTES.SEARCH_REPORT.getRoute({reportID, reportActionID, backTo}));

// We always want to open it in RHP
Navigation.navigate(ROUTES.SEARCH_REPORT.getRoute({reportID, reportActionID, backTo}), {reportPathConversionEnabled: false});
return;
}

Navigation.navigate(ROUTES.SEARCH_REPORT.getRoute({reportID, backTo}));
// We always want to open it in RHP
Navigation.navigate(ROUTES.SEARCH_REPORT.getRoute({reportID, backTo}), {reportPathConversionEnabled: false});
};

const fetchMoreResults = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import SCREENS from '@src/SCREENS';
// It's necessary to stay in RHP if we are in RHP report or in fullscreen if we are in fullscreen report.
function shouldConvertReportPath(currentFocusedRoute: NavigationPartialRoute, focusedRouteFromPath: NavigationPartialRoute) {
// @TODO: Navigating from search central pane could be handled with explicit convert: false option. We would need to add it as option to linkTo.
if (focusedRouteFromPath.name === SCREENS.REPORT && (currentFocusedRoute.name === SCREENS.SEARCH.REPORT_RHP || currentFocusedRoute.name === SCREENS.SEARCH.CENTRAL_PANE)) {
if (focusedRouteFromPath.name === SCREENS.REPORT && currentFocusedRoute.name === SCREENS.SEARCH.REPORT_RHP) {
return true;
}

Expand Down

0 comments on commit b2c1ec5

Please sign in to comment.