From 4008335b8fbb31c14d0f4740227cd74e1fd6bcfc Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Wed, 24 Aug 2022 21:07:00 +0200 Subject: [PATCH] Remove LayoutAnimation from KeyboardSpacer --- .../KeyboardSpacer/BaseKeyboardSpacer.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/components/KeyboardSpacer/BaseKeyboardSpacer.js b/src/components/KeyboardSpacer/BaseKeyboardSpacer.js index 0b1974c10901..ed72169f4e7a 100644 --- a/src/components/KeyboardSpacer/BaseKeyboardSpacer.js +++ b/src/components/KeyboardSpacer/BaseKeyboardSpacer.js @@ -1,23 +1,10 @@ import React, {PureComponent} from 'react'; import { - Dimensions, Keyboard, LayoutAnimation, View, + Dimensions, Keyboard, View, } from 'react-native'; import * as StyleUtils from '../../styles/StyleUtils'; import {propTypes, defaultProps} from './BaseKeyboardSpacerPropTypes'; -const defaultAnimation = { - duration: 500, - create: { - duration: 300, - type: LayoutAnimation.Types.easeInEaseOut, - property: LayoutAnimation.Properties.opacity, - }, - update: { - type: LayoutAnimation.Types.spring, - springDamping: 200, - }, -}; - class BaseKeyboardSpacer extends PureComponent { constructor(props) { super(props); @@ -52,7 +39,6 @@ class BaseKeyboardSpacer extends PureComponent { return; } - LayoutAnimation.configureNext(defaultAnimation); const screenHeight = Dimensions.get('window').height; const keyboardSpace = (screenHeight - event.endCoordinates.screenY) + this.props.topSpacing; this.setState({ @@ -66,8 +52,6 @@ class BaseKeyboardSpacer extends PureComponent { * @param {Object} [event] - A Keyboard Event. */ resetKeyboardSpace() { - LayoutAnimation.configureNext(defaultAnimation); - this.setState({ keyboardSpace: 0, }, this.props.onToggle(false, 0));