Skip to content

Commit

Permalink
Merge pull request #56220 from daledah/fix/55159
Browse files Browse the repository at this point in the history
  • Loading branch information
blimpich authored Feb 17, 2025
2 parents 0e4c5cc + 2740269 commit 8b719a0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/components/Search/SearchRouter/SearchRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import ROUTES from '@src/ROUTES';
import SCREENS from '@src/SCREENS';
import type Report from '@src/types/onyx/Report';
import isLoadingOnyxValue from '@src/types/utils/isLoadingOnyxValue';
import KeyboardUtils from '@src/utils/keyboard';
import {getQueryWithSubstitutions} from './getQueryWithSubstitutions';
import type {SubstitutionMap} from './getQueryWithSubstitutions';
import {getUpdatedSubstitutionsMap} from './getUpdatedSubstitutionsMap';
Expand Down Expand Up @@ -268,11 +269,13 @@ function SearchRouter({onRouterClose, shouldHideInputCaret}: SearchRouterProps)
} else {
onRouterClose();

if (item?.reportID) {
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(item?.reportID));
} else if ('login' in item) {
navigateToAndOpenReport(item.login ? [item.login] : [], false);
}
KeyboardUtils.dismiss().then(() => {
if (item?.reportID) {
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(item?.reportID));
} else if ('login' in item) {
navigateToAndOpenReport(item.login ? [item.login] : [], false);
}
});
}
},
[autocompleteSubstitutions, onRouterClose, onSearchQueryChange, submitSearch, textInputValue],
Expand Down

0 comments on commit 8b719a0

Please sign in to comment.