From 0cc80b4d0cb78a835977dbe5100262a16882bbea Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Dall'Agnol Date: Mon, 17 Jan 2022 11:35:42 -0800 Subject: [PATCH] fix: KeyboardAvoidingView _updateBottomIfNecessary typo (#32894) Summary: While working on a fix for https://github.com/facebook/react-native/issues/29974 I notice that the `_updateBottomIfNecessary` function inside `KeyboardAvoidingView` was misspelled, so I decided to open a PR fixing it. ## Changelog [General] [Fixed] - Fix typo in _updateBottomIfNecessary function on KeyboardAvoidingView component Pull Request resolved: https://github.com/facebook/react-native/pull/32894 Test Plan: Shouldn't require much testing as this is just renaming a private function of `KeyboardAvoidingView` Reviewed By: philIip Differential Revision: D33620554 Pulled By: cortinico fbshipit-source-id: 69b8969bef09cf58b9b1c8a9154dc52686187f8a --- Libraries/Components/Keyboard/KeyboardAvoidingView.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/Components/Keyboard/KeyboardAvoidingView.js b/Libraries/Components/Keyboard/KeyboardAvoidingView.js index 6789fd5d792..4536402c510 100644 --- a/Libraries/Components/Keyboard/KeyboardAvoidingView.js +++ b/Libraries/Components/Keyboard/KeyboardAvoidingView.js @@ -87,7 +87,7 @@ class KeyboardAvoidingView extends React.Component { _onKeyboardChange = (event: ?KeyboardEvent) => { this._keyboardEvent = event; - this._updateBottomIfNecesarry(); + this._updateBottomIfNecessary(); }; _onLayout = (event: ViewLayoutEvent) => { @@ -99,7 +99,7 @@ class KeyboardAvoidingView extends React.Component { } if (wasFrameNull) { - this._updateBottomIfNecesarry(); + this._updateBottomIfNecessary(); } if (this.props.onLayout) { @@ -107,7 +107,7 @@ class KeyboardAvoidingView extends React.Component { } }; - _updateBottomIfNecesarry = () => { + _updateBottomIfNecessary = () => { if (this._keyboardEvent == null) { this.setState({bottom: 0}); return;