Only blur input when index changes on transition start (Fixes #4148)

This commit is contained in:
Brent Vatne
2018-05-07 11:47:56 -07:00
parent 39d5714ac0
commit 6499f02157
2 changed files with 13 additions and 6 deletions

View File

@@ -24,9 +24,9 @@ class ScreenOne extends React.Component {
}
class ScreenTwo extends React.Component {
static navigationOptions = {
title: 'Screen w/ Input',
};
static navigationOptions = ({ navigation }) => ({
title: navigation.getParam('inputValue', 'Screen w/ Input'),
});
componentDidMount() {
InteractionManager.runAfterInteractions(() => {
@@ -41,6 +41,7 @@ class ScreenTwo extends React.Component {
<View style={{ alignSelf: 'center', paddingVertical: 20 }}>
<TextInput
ref={c => (this._textInput = c)}
onChangeText={inputValue => navigation.setParams({ inputValue })}
style={{
backgroundColor: 'white',
height: 24,