change the scrollPersistTap
This commit is contained in:
parent
da62dcb214
commit
1f26b82d20
|
@ -1,9 +1,7 @@
|
|||
import React from 'react';
|
||||
import { KeyboardAwareScrollView, KeyboardAwareScrollViewProps } from '@codler/react-native-keyboard-aware-scroll-view';
|
||||
import { Keyboard, Pressable } from 'react-native';
|
||||
|
||||
import scrollPersistTaps from '../lib/methods/helpers/scrollPersistTaps';
|
||||
import sharedStyles from '../views/Styles';
|
||||
|
||||
interface IKeyboardViewProps extends KeyboardAwareScrollViewProps {
|
||||
keyboardVerticalOffset?: number;
|
||||
|
@ -20,13 +18,7 @@ const KeyboardView = ({ style, contentContainerStyle, scrollEnabled, keyboardVer
|
|||
alwaysBounceVertical={false}
|
||||
extraHeight={keyboardVerticalOffset}
|
||||
>
|
||||
{/** Use Pressable instead of TouchableWithoutFeedback, because the TouchableWithoutFeedback requires a view wrapping the children
|
||||
* and this wrapping is causing wrong behavior on ScrollView
|
||||
* https://stackoverflow.com/a/74456534
|
||||
* */}
|
||||
<Pressable style={sharedStyles.container} onPress={() => Keyboard.dismiss()}>
|
||||
{children}
|
||||
</Pressable>
|
||||
{children}
|
||||
</KeyboardAwareScrollView>
|
||||
);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { KeyboardAwareScrollViewProps } from '@codler/react-native-keyboard-aware-scroll-view';
|
||||
|
||||
const scrollPersistTaps: Partial<KeyboardAwareScrollViewProps> = {
|
||||
keyboardShouldPersistTaps: 'always',
|
||||
keyboardShouldPersistTaps: 'handled',
|
||||
keyboardDismissMode: 'interactive'
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue