Skip to content

Commit

Permalink
Merge pull request #51032 from software-mansion-labs/kicu/50982-searc…
Browse files Browse the repository at this point in the history
…h-fixes

[CP Staging] Fix Search back button on mWeb and report opening in Search
  • Loading branch information
luacmartins authored Oct 17, 2024
2 parents 50482b1 + 4ee12c4 commit 20b85d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Search/SearchRouter/SearchRouterList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function SearchRouterList(
if ('reportID' in item && item?.reportID) {
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(item?.reportID));
} else if ('login' in item) {
Report.navigateToAndOpenReport(item?.login ? [item.login] : []);
Report.navigateToAndOpenReport(item.login ? [item.login] : [], false);
}
},
[closeAndClearRouter, onSearchSubmit, currentQuery, updateUserSearchQuery],
Expand Down
10 changes: 8 additions & 2 deletions src/components/Search/SearchRouter/SearchRouterModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import FocusTrapForModal from '@components/FocusTrap/FocusTrapForModal';
import Modal from '@components/Modal';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import * as Browser from '@libs/Browser';
import CONST from '@src/CONST';
import SearchRouter from './SearchRouter';
import {useSearchRouterContext} from './SearchRouterContext';
Expand All @@ -15,12 +16,17 @@ function SearchRouterModal() {
return (
<Modal
type={modalType}
fullscreen
isVisible={isSearchRouterDisplayed}
popoverAnchorPosition={{right: 6, top: 6}}
fullscreen
shouldHandleNavigationBack={Browser.isMobileChrome()}
onClose={closeSearchRouter}
>
<FocusTrapForModal active={isSearchRouterDisplayed}>{isSearchRouterDisplayed && <SearchRouter onRouterClose={closeSearchRouter} />}</FocusTrapForModal>
{isSearchRouterDisplayed && (
<FocusTrapForModal active={isSearchRouterDisplayed}>
<SearchRouter onRouterClose={closeSearchRouter} />
</FocusTrapForModal>
)}
</Modal>
);
}
Expand Down

0 comments on commit 20b85d5

Please sign in to comment.