What does `extraHeight` property do on `react-native-keyboard-aware-scroll-view`

Viewed 338

I am implementing react-native-keyboard-aware-scroll-view in my react-native app, and I have a quick question about the extraHeight property, which you can assign a number to. In the docs this property is described like so:

Adds an extra offset when focusing the TextInputs.

My implementation looks like this:

  <KeyboardAwareScrollView
    enableAutomaticScroll
    enableOnAndroid
    keyboardOpeningTime={0}
    extraHeight={600}
    style={{
      ...config.defaultStyles.layout.container,
      backgroundColor: config.defaultStyles.colors.background,
      padding: 0,
    }}
  >{this.props.children}
  </KeyboardAwareScrollView>

My question is around what this specifically means. What is the offset here on extraHeight, and what does that change, in terms of the user experience? I've tried adjusting the value but I'm not clear on what it is doing exactly.

1 Answers

this will raise your input a little higher. if KeyboardAwareScrollView is used and still something is not visible, you use extraHeight to position the scroll a little further.

Related