[FIX] MultiSelect Keyboard behavior (Android) (#1969)

* fixed-modal-position

* made-changes

Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
This commit is contained in:
Prateek Jain 2020-04-01 21:40:43 +05:30 committed by GitHub
parent e62a7e84c8
commit 011ac043a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import TextInput from '../../TextInput';
import { textParser } from '../utils';
import { themes } from '../../../constants/colors';
import I18n from '../../../i18n';
import { isIOS } from '../../../utils/deviceInfo';
import Chips from './Chips';
import Items from './Items';
@ -26,6 +27,8 @@ const ANIMATION_PROPS = {
};
const animatedValue = new Animated.Value(0);
const behavior = isIOS ? 'padding' : null;
export const MultiSelect = React.memo(({
options = [],
onChange,
@ -170,7 +173,7 @@ export const MultiSelect = React.memo(({
<TouchableWithoutFeedback onPress={onHide}>
<View style={styles.container}>
<View style={[styles.backdrop, { backgroundColor: themes[theme].backdropColor }]} />
<KeyboardAvoidingView style={styles.keyboardView} behavior='padding'>
<KeyboardAvoidingView style={styles.keyboardView} behavior={behavior}>
<Animated.View style={[styles.animatedContent, { transform: [{ translateY }] }]}>
{showContent ? renderContent() : null}
</Animated.View>