Set keyboardDismisMode to interactive on the report dialog (#3288)
parent
b6c9d34e45
commit
2e2fae378a
|
@ -206,12 +206,16 @@ export function Inner({children, style}: DialogInnerProps) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ScrollableInner({children, style}: DialogInnerProps) {
|
export function ScrollableInner({
|
||||||
|
children,
|
||||||
|
keyboardDismissMode,
|
||||||
|
style,
|
||||||
|
}: DialogInnerProps) {
|
||||||
const insets = useSafeAreaInsets()
|
const insets = useSafeAreaInsets()
|
||||||
return (
|
return (
|
||||||
<BottomSheetScrollView
|
<BottomSheetScrollView
|
||||||
keyboardShouldPersistTaps="handled"
|
keyboardShouldPersistTaps="handled"
|
||||||
keyboardDismissMode="on-drag"
|
keyboardDismissMode={keyboardDismissMode || 'on-drag'}
|
||||||
style={[
|
style={[
|
||||||
a.flex_1, // main diff is this
|
a.flex_1, // main diff is this
|
||||||
a.p_xl,
|
a.p_xl,
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import type {AccessibilityProps, GestureResponderEvent} from 'react-native'
|
import type {
|
||||||
|
AccessibilityProps,
|
||||||
|
GestureResponderEvent,
|
||||||
|
ScrollViewProps,
|
||||||
|
} from 'react-native'
|
||||||
import {BottomSheetProps} from '@gorhom/bottom-sheet'
|
import {BottomSheetProps} from '@gorhom/bottom-sheet'
|
||||||
|
|
||||||
import {ViewStyleProp} from '#/alf'
|
import {ViewStyleProp} from '#/alf'
|
||||||
|
@ -61,9 +65,11 @@ export type DialogInnerProps =
|
||||||
label?: undefined
|
label?: undefined
|
||||||
accessibilityLabelledBy: A11yProps['aria-labelledby']
|
accessibilityLabelledBy: A11yProps['aria-labelledby']
|
||||||
accessibilityDescribedBy: string
|
accessibilityDescribedBy: string
|
||||||
|
keyboardDismissMode?: ScrollViewProps['keyboardDismissMode']
|
||||||
}>
|
}>
|
||||||
| DialogInnerPropsBase<{
|
| DialogInnerPropsBase<{
|
||||||
label: string
|
label: string
|
||||||
accessibilityLabelledBy?: undefined
|
accessibilityLabelledBy?: undefined
|
||||||
accessibilityDescribedBy?: undefined
|
accessibilityDescribedBy?: undefined
|
||||||
|
keyboardDismissMode?: ScrollViewProps['keyboardDismissMode']
|
||||||
}>
|
}>
|
||||||
|
|
|
@ -37,7 +37,9 @@ function ReportDialogInner(props: ReportDialogProps) {
|
||||||
const isLoading = useDelayedLoading(500, isLabelerLoading)
|
const isLoading = useDelayedLoading(500, isLabelerLoading)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog.ScrollableInner label="Report Dialog">
|
<Dialog.ScrollableInner
|
||||||
|
label="Report Dialog"
|
||||||
|
keyboardDismissMode="interactive">
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
<View style={[a.align_center, {height: 100}]}>
|
<View style={[a.align_center, {height: 100}]}>
|
||||||
<Loader size="xl" />
|
<Loader size="xl" />
|
||||||
|
|
Loading…
Reference in New Issue