mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 01:40:08 +00:00
Fix warning in InputAccessoryView (#21174)
Summary: Currently the warning is always triggered, even on iOS. This simply adds a platform check and tweak the message. Pull Request resolved: https://github.com/facebook/react-native/pull/21174 Differential Revision: D9929679 Pulled By: hramos fbshipit-source-id: 383f4a820cf5bf261dbfdcff3b950f9812a65e00
This commit is contained in:
parent
fd3bb5769d
commit
a0f7d6090f
@ -11,6 +11,7 @@
|
||||
|
||||
const ColorPropType = require('ColorPropType');
|
||||
const DeprecatedViewPropTypes = require('DeprecatedViewPropTypes');
|
||||
const Platform = require('Platform');
|
||||
const React = require('React');
|
||||
const StyleSheet = require('StyleSheet');
|
||||
|
||||
@ -89,7 +90,9 @@ type Props = {
|
||||
|
||||
class InputAccessoryView extends React.Component<Props> {
|
||||
render(): React.Node {
|
||||
console.warn('<InputAccessoryView> is not supported on Android yet.');
|
||||
if (Platform.OS !== 'ios') {
|
||||
console.warn('<InputAccessoryView> is only supported on iOS.');
|
||||
}
|
||||
|
||||
if (React.Children.count(this.props.children) === 0) {
|
||||
return null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user