Skip to content

Documented example causes "Cannot read property 'height' of undefined" #28

@shatran

Description

@shatran

Hi,
when running the example i get "Cannot read property 'height' of undefined" in 'keyboardWillShow'.
The solution for this is to add an if (e.endCoordinates && e.endCoordinates.height) so the function now looks like this:

  keyboardWillShow (e) {
    if (e.endCoordinates && e.endCoordinates.height) {
      let newSize = Dimensions.get('window').height - e.endCoordinates.height;
      this.setState({visibleHeight: newSize})
    }
  }

And BTW thanks for this project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions