Skip to content

iOS - Expense Reports - Report page cannot be dismissed by swiping to right #60812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React from 'react';
import type {PlatformStackNavigationOptions, PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
import useSplitNavigatorScreenOptions from '@libs/Navigation/AppNavigator/useSplitNavigatorScreenOptions';
import Animations from '@libs/Navigation/PlatformStackNavigation/navigationOptions/animation';
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
import type {AuthScreensParamList, SearchFullscreenNavigatorParamList} from '@libs/Navigation/types';
import * as SearchQueryUtils from '@libs/SearchQueryUtils';
import createSearchFullscreenNavigator from '@navigation/AppNavigator/createSearchFullscreenNavigator';
import FreezeWrapper from '@navigation/AppNavigator/FreezeWrapper';
import useRootNavigatorScreenOptions from '@navigation/AppNavigator/useRootNavigatorScreenOptions';
import type NAVIGATORS from '@src/NAVIGATORS';
import SCREENS from '@src/SCREENS';
import type ReactComponentModule from '@src/types/utils/ReactComponentModule';
Expand All @@ -15,25 +16,20 @@ const loadSearchMoneyReportPage = () => require<ReactComponentModule>('@pages/Se
const Stack = createSearchFullscreenNavigator<SearchFullscreenNavigatorParamList>();

function SearchFullscreenNavigator({route}: PlatformStackScreenProps<AuthScreensParamList, typeof NAVIGATORS.SEARCH_FULLSCREEN_NAVIGATOR>) {
const rootNavigatorScreenOptions = useRootNavigatorScreenOptions();
const searchRootScreenOptions: PlatformStackNavigationOptions = {
...rootNavigatorScreenOptions.fullScreen,
web: {
...rootNavigatorScreenOptions.fullScreen.web,
cardStyleInterpolator: undefined,
},
};
// These options can be used here because the full screen navigator has the same structure as the split navigator in terms of the central screens, but it does not have a sidebar.
const {centralScreen: centralScreenOptions} = useSplitNavigatorScreenOptions();
return (
<FreezeWrapper>
<Stack.Navigator
screenOptions={searchRootScreenOptions}
screenOptions={centralScreenOptions}
defaultCentralScreen={SCREENS.SEARCH.ROOT}
parentRoute={route}
>
<Stack.Screen
name={SCREENS.SEARCH.ROOT}
getComponent={loadSearchPage}
initialParams={{q: SearchQueryUtils.buildSearchQueryString()}}
options={{animation: Animations.NONE}}
/>
<Stack.Screen
name={SCREENS.SEARCH.MONEY_REQUEST_REPORT}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const useRootNavigatorScreenOptions = () => {
cardStyle: {
height: '100%',
},
cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator({props, isFullScreenModal: true, shouldAnimateSidePanel: true}),
cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator({props, isFullScreenModal: true}),
},
},
} satisfies RootNavigatorScreenOptions;
Expand Down
Loading