【发布时间】:2020-08-09 15:06:35
【问题描述】:
配置如下:
class MyComponent extends Component {
constructor(props) {
super(props);
this.inputRef = React.createRef();
}
...
render() {
...
<TextInput style={styles.textInput}
...
ref={this.inputRef}
/>
...
}
}
问。如何在 render() 方法中找出 TextInput 是否有焦点?
【问题讨论】:
标签: react-native react-native-textinput