Skip to content

Commit 56c1232

Browse files
committed
Remove usage of toggleExpandedKeyboard and prettify
1 parent adf3a71 commit 56c1232

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

demo/src/screens/nativeComponentScreens/keyboardInput/demoKeyboards.js

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, {Component} from 'react';
22
import PropTypes from 'prop-types';
3-
import {Keyboard, Colors, Constants} from 'react-native-ui-lib';
3+
import {Keyboard, Colors} from 'react-native-ui-lib';
44
const KeyboardRegistry = Keyboard.KeyboardRegistry;
55
import KeyboardView from './KeyboardView';
66

@@ -17,13 +17,7 @@ class KeyboardView1 extends Component {
1717

1818
render() {
1919
const {title} = this.props;
20-
return (
21-
<KeyboardView
22-
title={title}
23-
backgroundColor={Colors.violet10}
24-
onPress={this.onButtonPress}
25-
/>
26-
);
20+
return <KeyboardView title={title} backgroundColor={Colors.violet10} onPress={this.onButtonPress}/>;
2721
}
2822
}
2923

@@ -33,24 +27,14 @@ class KeyboardView2 extends Component {
3327
};
3428

3529
onButtonPress() {
36-
if (Constants.isIOS) {
37-
KeyboardRegistry.toggleExpandedKeyboard('KeyboardView2');
38-
} else {
39-
KeyboardRegistry.onItemSelected('KeyboardView2', {
40-
message: 'Item selected from keyboard 2'
41-
});
42-
}
30+
KeyboardRegistry.onItemSelected('KeyboardView2', {
31+
message: 'Item selected from keyboard 2'
32+
});
4333
}
4434

4535
render() {
4636
const {title} = this.props;
47-
return (
48-
<KeyboardView
49-
title={title}
50-
backgroundColor={Colors.yellow20}
51-
onPress={this.onButtonPress}
52-
/>
53-
);
37+
return <KeyboardView title={title} backgroundColor={Colors.yellow20} onPress={this.onButtonPress}/>;
5438
}
5539
}
5640

0 commit comments

Comments
 (0)