react-navigation / react-navigation/react-navigation.github.io
Docs: `overrideScrollViewContentInsetAdjustmentBehavior` option missing from Native Bottom Tab Navigator page
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 324
- 派生
- 2k
- PR 合并指标
- 30 天内没有已合并 PR
描述
The Tab.Screen option overrideScrollViewContentInsetAdjustmentBehavior is implemented and exposed in @react-navigation/bottom-tabs/unstable but not listed on the Native Bottom Tab Navigator docs page.
It's an iOS-only option with non-obvious default behaviour, and it's the only escape hatch for a fairly common visible bug — a blank gap appearing above content in a native-stack screen with headerTransparent: true nested inside a NativeTabs tab. The bug was reported in #12946 and the fix is exactly this option, but a reader hitting the symptom has no way to discover it from the docs.
JSDoc from the source
Whether to override the
contentInsetAdjustmentBehaviorof the firstScrollViewin the first descendant chain from the tab screen.By default,
react-native'sScrollViewhascontentInsetAdjustmentBehaviorset toneverinstead of UIKit-default (which isautomatic). This prevents ScrollViews from respecting navigation bar insets. When this prop is set totrue,automaticbehavior is reverted.To disable this behavior for specific screens, set this option to
false.Only supported with
nativeimplementation.Defaults to
true. iOS-only.
Suggested doc placement
Under "Options" on docs/native-bottom-tab-navigator.md, next to tabBarStyle / tabBarMinimizeBehavior (other iOS-flavoured presentation options). A brief mention of the symptom it fixes ("blank gap above content in a nested transparent-header screen on iOS") would help a lot.
Happy to PR if useful — just want to flag the gap before the next person hits it.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
打开 docs/native-bottom-tab-navigator.md,阅读 tabBarStyle 和 tabBarMinimizeBehavior 附近的 Options 部分。检查 packages/bottom-tabs/src/unstable/types.tsx 中该选项的 JSDoc,然后记录其默认值、iOS-only 和 native-only 限制,以及透明标题栏出现空白间隙的现象。当读者可以在 Native Bottom Tab Navigator 页面上找到并理解此选项时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react-native
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 活跃度
- 冷清
- 描述清晰度
- 描述清楚
- 新手友好度
- 90/100