Layout breaks when changing lanes option with measureElement used
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- typescript
- Área
- frontend
Línea de trabajo
Comienza con la reproducción enlazada de CodeSandbox y sigue la ruta de useVirtualizer que involucra measureElement, lanes dinámicos y mediciones de elementos almacenadas en caché. Reproduce el fallo desplazándote hasta el final, cambiando los lanes de 10 a 5, y confirma que el diseño recalcula las posiciones sin elementos mal posicionados ni espacios vacíos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
When using measureElement with useVirtualizer, changing the number of lanes dynamically causes the layout to break.
The virtualizer calculates incorrect ranges for items with indices beyond the visible range, resulting in mispositioned items or empty spaces.
Your minimal, reproducible example
Steps to reproduce
- Scroll to the end of the list (so that only higher-index items are rendered).
- Change the number of lanes from 10 to 5 dynamically.
Expected behavior
- The virtualizer should correctly invalidate cached measurements for all items and recalculate their positions when the number of lanes changes.
- The layout should adjust seamlessly after changing lanes.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Any platform
tanstack-virtual version
3.13.12
TypeScript version
5.2.2
Additional context
No response
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
- Lenguaje dominante
- TypeScript
- Estrellas
- 7.1k
- Forks
- 472
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 12
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 TanStack/virtual
-
measureElement caches 0 size for nodes that aren't attached yet (Vue: rows stack at start 0 and the list scrolls away on mount)Posiblemente ocupada @webn00b la tomó hace 8 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
`scrollToIndex(last, { align: 'end' })` stays short of the end after a measured row grows (virtual-core ≥ 3.17.0)Posiblemente ocupada @minwookshin la tomó hace 6 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
TanStack/virtual#1290 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
virtual-core: desktop Safari drops the prepend anchor write when history lands during the top rubber-band bouncePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
marko-virtual: scrollToEnd during an in-flight prepend strands the view one prepend above the bottom (chat-pretext e2e fails on CI)Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
Todos los issues de TanStack/virtual
Issues similares
-
Upgrade node-libzim to 4.7.0Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
openzim/mwoffliner#2933 ·
Los mantenedores suelen responder en 1 día
-
Use the README category name for website links and submissionsPosiblemente ocupada @dajiaohuang la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
birobirobiro/awesome-shadcn-ui#647 ·
Los mantenedores suelen responder en 2 días
-
Add: Valea Prahovei TV RO SDAbiertocheck:passed streams:add
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Urigo/accounter-fullstack#4604 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día