mirror of
https://github.com/status-im/react-native.git
synced 2025-02-23 22:58:19 +00:00
Fix autoFocus
Summary: In D13408886, I landed a PR that broke the `autoFocus` prop. This diff fixes this prop by partially reveting some of the changes in that diff. Reviewed By: TheSavior Differential Revision: D13611258 fbshipit-source-id: 225b9b59b2500cfac092f13c273685aaeb599ab0
This commit is contained in:
parent
f40a04ae3a
commit
0265ee199b
@ -891,6 +891,10 @@ const TextInput = createReactClass({
|
||||
// tag is null only in unit tests
|
||||
TextInputState.registerInput(tag);
|
||||
}
|
||||
|
||||
if (this.props.autoFocus) {
|
||||
this._rafId = requestAnimationFrame(this.focus);
|
||||
}
|
||||
},
|
||||
|
||||
componentWillUnmount: function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user