-
Notifications
You must be signed in to change notification settings - Fork 645
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
Conversation
lib/KeyboardAwareHOC.js
Outdated
if (this.props.viewIsInsideTabBar) { | ||
keyboardSpace -= _KAM_DEFAULT_TAB_BAR_HEIGHT | ||
} | ||
this.setState({ keyboardSpace }) | ||
// Automatically scroll to focused TextInput | ||
if (this.props.enableAutoAutomaticScroll) { |
There was a problem hiding this comment.
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.
LGTM 🚀 |
lib/KeyboardAwareHOC.js
Outdated
@@ -235,7 +234,7 @@ function listenToKeyboardEvents(ScrollableComponent: React$Component) { | |||
) { | |||
this.scrollForExtraHeightOnAndroid( | |||
totalExtraHeight - | |||
(keyboardPosition - textInputBottomPosition) | |||
(keyboardPosition - textInputBottomPosition) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this run prettier
??
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.