Skip to content

fix enableAutoAutomaticScroll prop #215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 19, 2018

Conversation

antoinegrelard
Copy link
Contributor

This pull request allows us to actually enable or disable the automatic scroll when focusing an input, as the prop was there but not working.

if (this.props.viewIsInsideTabBar) {
keyboardSpace -= _KAM_DEFAULT_TAB_BAR_HEIGHT
}
this.setState({ keyboardSpace })
// Automatically scroll to focused TextInput
if (this.props.enableAutoAutomaticScroll) {
Copy link
Collaborator

@alvaromb alvaromb Jan 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Can you rename this prop to the intended name? It should be enableAutomaticScroll, not enableAutoAutomaticScroll (note the extra Auto). This has been an error I've introduced myself, but it would be great to change it with this PR.

@alvaromb
Copy link
Collaborator

LGTM 🚀

@@ -235,7 +234,7 @@ function listenToKeyboardEvents(ScrollableComponent: React$Component) {
) {
this.scrollForExtraHeightOnAndroid(
totalExtraHeight -
(keyboardPosition - textInputBottomPosition)
(keyboardPosition - textInputBottomPosition)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this run prettier??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woops, let me fix this haha

Copy link
Collaborator

@alvaromb alvaromb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@alvaromb alvaromb merged commit 1875414 into APSL:master Jan 19, 2018
@alvaromb
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants