Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix example code relating to v0.0.7
  • Loading branch information
benjaminreid authored Aug 9, 2016
commit ac54727b4526324c77e17ec87fa4dad1fb42f675
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ As of `v0.1.0`, the component auto scrolls to the focused `TextInput` 😎. For
In order to scroll to any `TextInput` field, you can use the built-in method `scrollToFocusedInput`. Example:

```js
_scrollToInput (reactNode: any) {
_scrollToInput (event, reactNode: any) {
// Add a 'scroll' ref to your ScrollView
this.refs.scroll.scrollToFocusedInput(reactNode)
this.refs.scroll.scrollToFocusedInput(event, reactNode)
}
```

Expand All @@ -59,7 +59,7 @@ _scrollToInput (reactNode: any) {
<View>
<TextInput onFocus={(event: Event) => {
// `bind` the function if you're using ES6 classes
this._scrollToInput(ReactNative.findNodeHandle(event.target))
this._scrollToInput(event, ReactNative.findNodeHandle(event.target))
}/>
</View>
</KeyboardAwareScrollView>
Expand Down