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

Android TextInput doesn't display its UI #62

Open
jbrodriguez opened this issue Sep 14, 2016 · 3 comments
Open

Android TextInput doesn't display its UI #62

jbrodriguez opened this issue Sep 14, 2016 · 3 comments

Comments

@jbrodriguez
Copy link
Contributor

Hi, it's mostly a heads-up, since you're working on a new version.

I had opened this issue (facebook/react-native#9862) on RN, but after isolating the issue, I found out it is a form-generator issue.

I commented InputComponent.js so that handleLayoutChange and handleLabelLayoutChange are no-ops.

I'm not sure about the implications, but it's working fine in my Android app so far.

  handleLayoutChange(e){
    // let {x, y, width, height} = {... e.nativeEvent.layout};
    //
    // this.setState(e.nativeEvent.layout);
    // //e.nativeEvent.layout: {x, y, width, height}}}.
  }

  handleLabelLayoutChange(e){
    // let {x, y, width, height} = {... e.nativeEvent.layout};
    //
    // this.setState({labelWidth:width});
    // //e.nativeEvent.layout: {x, y, width, height}}}.
  }
@jbrodriguez
Copy link
Contributor Author

Had to change the code, because iOS wants the layout changes.

So it would be more like

  handleLayoutChange(e){
      if (Platform.OS === 'ios') {
          let {x, y, width, height} = {... e.nativeEvent.layout};

          this.setState(e.nativeEvent.layout);
      }
    // //e.nativeEvent.layout: {x, y, width, height}}}.
  }

  handleLabelLayoutChange(e){
      if (Platform.OS === 'ios') {
          let {x, y, width, height} = {... e.nativeEvent.layout};

          this.setState({labelWidth:width});
      }
    // //e.nativeEvent.layout: {x, y, width, height}}}.
  }

@MichaelCereda
Copy link
Owner

I'm going to investigate

@gmlion
Copy link

gmlion commented Oct 12, 2016

I just realized it's the same problem of my report, you can check it for further details: #68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants