nikhilaravi / react-native-smart-scroll-view

A smart scroll view component with handling of keyboard events
MIT License
153 stars 31 forks source link

Can't get this working with RN0.31 #28

Open npomfret opened 8 years ago

npomfret commented 8 years ago

Hi

I can't seem to get this working. I think the examples are a lot more complicated than they need to be. What are the minimum steps required to make a single TextInput scroll into view?

So far I have something like:

      <SmartScrollView
        forceFocusField={this.state.focusField}
        onRefFocus={forceFocusField => this.setState({focusField: forceFocusField})}
      >
         ... other stuff here
            <TextInput
              smartScrollOptions={{type: 'text', scrollRef: "someRef"}}
            />
      </SmartScrollView>

But this doesn't work.

Firstly, the TextInput doesn't scroll into view.

Secondly, I can't get the keyboard to dismiss no matter what. Previously I was using keyboardDismissMode="on-drag" but this no longer works.

Thirdly, when switching to a 2nd TextInput the auto-correct/complete box on top of the keyboard in iOS goes transparent and there are no suggestions in it.

What am I doing wrong please?