Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set focus in TouchableHighlight? #28957

Closed
artem54325 opened this issue May 23, 2020 · 5 comments
Closed

How to set focus in TouchableHighlight? #28957

artem54325 opened this issue May 23, 2020 · 5 comments
Labels
Component: TouchableHighlight Needs: Attention Issues where the author has responded to feedback. Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@artem54325
Copy link

I am trying to set and turn off the focus in the TouchableHighlight item for Android TV for remote control,
How can I do that?

npm -v
6.13.4
react-native -v
react-native-cli: 2.0.1

  enableTVEventHandler() {
    this.evtHandler = new TVEventHandler();
    this.evtHandler.enable(this, this.handleTVRemoteEvent);
  }

  disableTVEventHandler() {
    if (this.evtHandler) {
      this.evtHandler.disable();
      delete this.evtHandler;
    }
  }
  handleTVRemoteEvent = (cmp, event) => {
    const { eventType, tag } = event;
  }
  render() {
    const { children, hide, ...props } = this.props;

    return (
      <TouchableHighlight {...props} ref={this.myRef} style={[props.style]}>
        {children}
      </TouchableHighlight>
    )
@react-native-bot react-native-bot added Component: TouchableHighlight Needs: Author Feedback Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. and removed Needs: Triage 🔍 labels May 23, 2020
@github-actions
Copy link

⚠️ Missing Environment Information
ℹ️ Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console.

@artem54325
Copy link
Author

I updated:
System:
OS: Linux 5.3 Ubuntu 18.04.4 LTS (Bionic Beaver)
CPU: (8) x64 Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Memory: 818.41 MB / 11.64 GB
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 10.19.0 - /usr/bin/node
npm: 6.13.4 - /usr/bin/npm
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6241897
npmPackages:
react: ^16.13.1 => 16.13.1
react-native: 0.61.5 => 0.61.5
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels May 24, 2020
@fabOnReact
Copy link
Contributor

#24448 (comment)

@stale
Copy link

stale bot commented Aug 23, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 23, 2020
@stale
Copy link

stale bot commented Aug 31, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 31, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: TouchableHighlight Needs: Attention Issues where the author has responded to feedback. Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

3 participants