SortableGridList does not forward props to its inner ScrollView (inconsistent with SortableList)
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- react-native, typescript
- Área
- mobile
Línea de trabajo
Comienza en src/components/sortableGridList/index.tsx y compara la extracción de props y el ScrollView interno con src/components/sortableList/index.tsx. Verifica que la API elegida reenvíe las props compatibles de ScrollView, incluido scrollEnabled, sin sobrescribir los estilos propios del componente, y confirma que el caso de uso de arrastre reportado funciona.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- TypeScript
- Estrellas
- 7.2k
- Forks
- 749
- Merge medio
- 29 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de wix/react-native-ui-lib
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
wix/react-native-ui-lib#4022 ·
Los mantenedores suelen responder en 1 día
-
RN 0.85.0 StyleSheet.absoluteFillObject is removedPosiblemente ocupada @ChrisJamesC la tomó hace 80 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
wix/react-native-ui-lib#3965 · 3 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
asBaseComponent: stale module-level colorScheme prevents re-render on scheme switch backPosiblemente ocupada @huytdps13400 la tomó hace 34 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
wix/react-native-ui-lib#3945 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
wix/react-native-ui-lib#4044 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
wix/react-native-ui-lib#4043 · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de wix/react-native-ui-lib
Issues similares
-
Add: ESP 2 ROAbiertoapproved check:passed streams:add
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
ipaas: Configure form shows "Deploy to apply." and "Overrides selected Link" when they don't applyAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
wso2/integration-control-plane#1118 ·
Los mantenedores suelen responder en 1 día
-
File reporting form UI DesignAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
UTDNebula/utd-notebook#311 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día