Skip to content

Conversation

@benjaminreid
Copy link

👋

I've been trying to get the example code working with 0.0.7 as I'm currently stuck on a lower version of React Native and have been going around in circles as to why it wasn't working.

After resorting to checking the source code, scrollToFocusedInput takes the node as the 2nd argument, not the first as per the README.md. I know it's only minor, but it may save someone else a little time in the future if they also can't be on the later versions of RN.

Code for reference from 0.0.7.

scrollToFocusedInput: function (event: Object, reactNode: Object, extraHeight: number = _KAM_DEFAULT_TAB_BAR_HEIGHT)
@alvaromb
Copy link
Collaborator

alvaromb commented Aug 9, 2016

Hello @nouveller !

The event is no longer necessary, it was an unused parameter I introduced by mistake in older versions. I prefer to maintain the docs updated to the latest version, so if you feel it's necessary, please add a note for older versions (https://github.com/APSL/react-native-keyboard-aware-scroll-view/blob/master/lib/KeyboardAwareMixin.js#L93). The parameter was removed in 0.10.0.

@benjaminreid
Copy link
Author

Hmm... Unless I'm mistaken, I believe my edit is specially referring to the old versions and not conflicting with the latest examples. As the edit is for the code examples under this line:

For versions v0.0.7 and older you can do the following.

I could be misunderstanding though. 😊

@alvaromb
Copy link
Collaborator

alvaromb commented Aug 9, 2016

Ok, I see.

Let's wait for RN 0.32, which includes a PR that solves all the issues with automatic scroll and please change the docs to specifically handle both +0.1.0 and 0.0.7 in order to be less confusing. You could want to manually handle the scroll in upper versions too, and that would introduce some confusion.

@benjaminreid
Copy link
Author

You could want to manually handle the scroll in upper versions too, and that would introduce some confusion.

Good point. I'll see if I can come up with a clear way to communicate both versions.

👍

@alvaromb alvaromb closed this Jul 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants