From 80fc415cf179ffe26d020bc8d6e4451352da94fd Mon Sep 17 00:00:00 2001 From: Manuel Alabor Date: Tue, 10 Apr 2018 19:47:21 -0700 Subject: [PATCH] Expose InputAccessoryView Module Summary: The latest release of react-native (0.55.2) does not expose the new `InputAccessoryView` component; It can't be accessed at all. This change fixes this problem. * Problem: Snack showing the problem: https://snack.expo.io/B1fDQRYif * Proof: `RNTester` still works with adapted imports No related PRs. [IOS] [BUGFIX] [InputAccessoryView] - Expose `InputAccessoryView` so it can be imported Closes https://github.com/facebook/react-native/pull/18780 Differential Revision: D7581729 Pulled By: hramos fbshipit-source-id: d61ab1f167360e829e32b93fb5414d2f7e57e115 --- .../react-native-implementation.js | 1 + RNTester/js/InputAccessoryViewExample.js | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Libraries/react-native/react-native-implementation.js b/Libraries/react-native/react-native-implementation.js index 200409bcb..e3b19adc4 100644 --- a/Libraries/react-native/react-native-implementation.js +++ b/Libraries/react-native/react-native-implementation.js @@ -26,6 +26,7 @@ const ReactNative = { get ImageBackground() { return require('ImageBackground'); }, get ImageEditor() { return require('ImageEditor'); }, get ImageStore() { return require('ImageStore'); }, + get InputAccessoryView() { return require('InputAccessoryView') }, get KeyboardAvoidingView() { return require('KeyboardAvoidingView'); }, get ListView() { return require('ListView'); }, get MaskedViewIOS() { return require('MaskedViewIOS'); }, diff --git a/RNTester/js/InputAccessoryViewExample.js b/RNTester/js/InputAccessoryViewExample.js index 7ebcf5f00..9287fb7e1 100644 --- a/RNTester/js/InputAccessoryViewExample.js +++ b/RNTester/js/InputAccessoryViewExample.js @@ -11,15 +11,18 @@ 'use strict'; -const Alert = require('Alert'); -const Button = require('Button'); -const InputAccessoryView = require('InputAccessoryView'); const React = require('React'); -const ScrollView = require('ScrollView'); -const StyleSheet = require('StyleSheet'); -const Text = require('Text'); -const TextInput = require('TextInput'); -const View = require('View'); +const ReactNative = require('react-native'); +const { + Alert, + Button, + InputAccessoryView, + ScrollView, + StyleSheet, + Text, + TextInput, + View, +} = ReactNative; class Message extends React.PureComponent<*> { render() {