SortableGridList does not forward props to its inner ScrollView (inconsistent with SortableList)
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- react-native, typescript
- 领域
- mobile
调研方向
从 src/components/sortableGridList/index.tsx 开始,将其 prop 提取方式和内部 ScrollView 与 src/components/sortableList/index.tsx 进行比较。验证所选 API 会转发 ScrollView 支持的 props(包括 scrollEnabled),且不会覆盖组件自身的样式,并确认报告中的拖拽用例能够正常工作。
由索引模型根据 Issue 内容生成。
描述
Description
SortableGridList renders an inner <ScrollView> but does not forward any extra props to it, making it impossible to set props like scrollEnabled, alwaysBounceVertical, showsVerticalScrollIndicator, keyboardShouldPersistTaps, etc. without patching.
This is inconsistent with SortableList, which does spread {...others} onto its internal FlatList:
```js
// src/components/sortableList/index.tsx (9.0.0)
<FlatList {...others} ref={listRef} horizontal={horizontal} data={data} ... />
```
But SortableGridList does not:
```js
// src/components/sortableGridList/index.tsx (9.0.0)
<ScrollView style={listStyle} contentContainerStyle={[styles.listContent, listContentStyle, listColumnWrapperStyle]}>
```
Real-world use case
A short, one-screen "reorder home cards" page where the list fits without scrolling. Enabling scroll causes the inner `ScrollView`'s scroll gesture to compete with the long-press-drag gesture used by `SortableItem`, making drag near the edge unreliable. The expected solution is to pass `scrollEnabled: false` to the inner `ScrollView`. There is currently no API to do this.
We currently maintain a `patch-package` patch against 7.x and confirmed it is still required in 9.0.0:
```diff
const {
itemSpacing = DEFAULT_ITEM_SPACINGS,
- data
- data,
- scrollViewProps = {}
} = others;
...
- <ScrollView contentContainerStyle={[styles.listContent, listContentStyle]}>
- <ScrollView contentContainerStyle={[styles.listContent, listContentStyle]} {...scrollViewProps}>
```
Suggested fix
Either:
- (preferred, matches `SortableList`) Spread `{...others}` onto the inner `ScrollView`, after extracting the props `SortableGridList` itself consumes.
- Or add a dedicated `scrollViewProps?: ScrollViewProps` prop on `SortableGridListProps`.
Happy to open a PR if the maintainers indicate a preferred approach.
Affected versions
At least 7.12.0 → 9.0.0 (latest at time of writing).
- 主要语言
- TypeScript
- 星标
- 7.2k
- 派生
- 749
- 平均合并
- 29 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
wix/react-native-ui-lib 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
wix/react-native-ui-lib#4022 ·
维护者通常 1 天内回复
-
RN 0.85.0 StyleSheet.absoluteFillObject is removed可能已有人在做 @ChrisJamesC 于 79 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 68/100
wix/react-native-ui-lib#3965 · 3 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
asBaseComponent: stale module-level colorScheme prevents re-render on scheme switch back可能已有人在做 @huytdps13400 于 33 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 85/100
wix/react-native-ui-lib#3945 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 35/100
wix/react-native-ui-lib#4044 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 35/100
wix/react-native-ui-lib#4043 · 1 个 reaction ·
维护者通常 1 天内回复
查看 wix/react-native-ui-lib 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
"Claude Code request is missing its initial user message" when the prompt starts with an image path未关闭
难度 2/5 1-3 小时 新手友好度 84/100
earendil-works/pi-claude-code#31 ·
维护者通常 8 天内回复
-
bug pending triage
难度 1/5 1 小时以内 新手友好度 92/100
privatenumber/cleye#48 ·
-
Google text documents are base64-encoded twice可能已有人在做 @feiiiiii5 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复