callstack / callstack/react-native-pager-view

With dynamic input, pager view assumes the new added element is at the end and not at the beginning.

Abierto
#808 0 comentarios 2 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
3.4k
Forks
476
Merge medio
10 d 21 h
PR fusionados (30 d)
2

Descripción

if we pass an array and we update the array adding a new element at the beginning of the array, native pager assumes that the element is added at the end. There should be an option to edit this.

This causes various bugs:
- setPage doesn't work. Calling setPage(0) actually scrolls to the second element given that a new one was added but it's not take into account.
- the scroll dots go out of sync.

The code is simply the standard example of PagerView but passing an array with an extra element at the beginning dynamically.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con el ejemplo estándar de PagerView descrito en el issue y reproduce el caso en el que un array recibe un elemento al principio. Rastrea cómo responden a ese cambio los elementos secundarios dinámicos, setPage(0) y los puntos de desplazamiento. Se considera terminado cuando anteponer un elemento mantiene sincronizados la página seleccionada y los puntos.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
react-native, typescript
Área
mobile
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.