Last active
August 8, 2020 17:29
-
-
Save cyb3rsalih/e9eee299cccd44d45d6b79ec80a09772 to your computer and use it in GitHub Desktop.
KeyboardAvoidingView optimum settings works both iOS and Android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react' | |
| export const KeyboardAvoidingView = props => { | |
| const lib = require('react-native-keyboard-aware-scroll-view') | |
| const defaultProps = { | |
| style: {flex: 1}, | |
| contentContainerStyle: {flexGrow: 1}, | |
| bounces: false, | |
| bouncesZoom: false, | |
| alwaysBounceVertical: false, | |
| alwaysBounceHorizontal: false, | |
| } | |
| return React.createElement(lib.KeyboardAwareScrollView, { | |
| enableOnAndroid: true, | |
| ...defaultProps, | |
| ...props, | |
| }) | |
| /* Source React Native UI Kitten */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment