Skip to content
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

fix: Web - Debug - RHP tabs can be swiped. #49764

Merged
merged 1 commit into from
Sep 30, 2024
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
2 changes: 2 additions & 0 deletions src/pages/Debug/DebugDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ function DebugDetails({data, onSave, onDelete, validate}: DebugDetailsProps) {
multiline={numberOfLines > 1}
defaultValue={value}
disabled={DETAILS_DISABLED_KEYS.includes(key as DetailsDisabledKeys)}
shouldInterceptSwipe
/>
);
})}
Expand All @@ -175,6 +176,7 @@ function DebugDetails({data, onSave, onDelete, validate}: DebugDetailsProps) {
label={key}
defaultValue={String(value)}
disabled={DETAILS_DISABLED_KEYS.includes(key as DetailsDisabledKeys)}
shouldInterceptSwipe
/>
))}
{numberFields.length === 0 && <Text style={[styles.textNormalThemeText, styles.ph5]}>None</Text>}
Expand Down
9 changes: 8 additions & 1 deletion src/pages/Debug/DebugJSON.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React, {useMemo} from 'react';
import {View} from 'react-native';
import Button from '@components/Button';
import * as Expensicons from '@components/Icon/Expensicons';
import ScrollView from '@components/ScrollView';
import SwipeInterceptPanResponder from '@components/SwipeInterceptPanResponder';
import Text from '@components/Text';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
Expand Down Expand Up @@ -35,7 +37,12 @@ function DebugJSON({data}: DebugJSONProps) {
}}
icon={Expensicons.Copy}
/>
<Text style={[styles.textLabel, styles.mb5, styles.border, styles.p2]}>{json}</Text>
<View
// eslint-disable-next-line react/jsx-props-no-spreading
{...SwipeInterceptPanResponder.panHandlers}
>
<Text style={[styles.textLabel, styles.mb5, styles.border, styles.p2]}>{json}</Text>
</View>
</ScrollView>
);
}
Expand Down
Loading