Как поставить фокусировку и убрать фокусировку TouchableWithoutFeedback?
Это для react-tv, Но я не знаю как поставить фокусировку и как запретить,
enableTVEventHandler() {
this.evtHandler = new TVEventHandler();
this.evtHandler.enable(this, this.handleTVRemoteEvent);
}
disableTVEventHandler() {
if (this.evtHandler) {
this.evtHandler.disable();
delete this.evtHandler;
}
}
componentDidMount() {
this.nodeHandle = findNodeHandle(this.myRef.current)
this.enableTVEventHandler();
if(this.props.firstFocus){
this.myRef.current.setNativeProps({ hasTVPreferredFocus: true })
}
}
componentWillUnmount() {
this.disableTVEventHandler();
}
handleBackButtonClick() {
if (this.props.onBack !== undefined) {
this.props.onBack();
}
// this.props.navigation.goBack(null);
return true;
}