-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Update TS docs for contentInsetAdjustmentBehavior #50069
base: main
Are you sure you want to change the base?
Update TS docs for contentInsetAdjustmentBehavior #50069
Conversation
Hi @steinalex! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Thanks @steinalex for this PR -- just wondering why |
Hey @lunaleaps! I was a bit confused by the iOS docs too, but I assumed it must be never by default after fixing a navigation bug. Take a look at this Expo snack and run it on iOS. If you go to the Sorry I don't have anything more comprehensive than that, at the moment. |
It was defaulted to |
Ah I see, so maybe its a react-native specific default. Gotcha, thanks for answering! |
@lunaleaps has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@@ -405,7 +405,7 @@ export interface ScrollViewPropsIOS { | |||
|
|||
/** | |||
* This property specifies how the safe area insets are used to modify the content area of the scroll view. | |||
* The default value of this property must be 'automatic'. But the default value is 'never' until RN@0.51. | |||
* The default value of this property is "never". Available on iOS 11 and later. |
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.
Current versions of RN don't support anything before 13.4, or maybe even 15, so this could just be removed.
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.
Thanks for the feedback @NickGerleman! I've updated both the JS and TS documentation to remove the iOS specific version part
@lunaleaps has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary:
Update the TS docs to reflect the default value for
contentInsetAdjustmentBehavior
. The TS docs suggest it will beautomatic
however it's actuallynever
.The default behaviour is correctly specified in the JS docs:
react-native/packages/react-native/Libraries/Components/ScrollView/ScrollView.js
Line 306 in 850760a
It's also documented as the default in the native module: https://github.com/facebook/react-native/blob/main/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm#L34
Changelog:
[General] [Fixed] - Fix TS docs for
contentInsetAdjustmentBehavior