Maximum update depth exceeded: rowVirtualizer.measureElement
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- react, typescript
- Domaine
- frontend, performance
Piste de recherche
Commencez par exécuter le dépôt de reproduction indiqué et comparez sa page table-dynamic-column-width avec la page table-fixed-column-width. Lisez l’exemple de virtualisation React référencé dans examples/react/virtualized-rows/src/main.tsx et suivez le comportement de measureElement. Le travail est terminé lorsque la virtualisation fonctionne sans l’erreur « maximum update depth », que les colonnes se dimensionnent dynamiquement sur toute la page et qu’elles prennent en charge les contraintes de largeur demandées.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the bug
Hello!
I am trying to add list virtualization to a tanstack table.
I followed the implementation example from https://github.com/TanStack/table/blob/main/examples/react/virtualized-rows/src/main.tsx. List virtualization is working great, but now it seems like I am forced to use a fixed width column. Before this, each column took a dynamic (different) width based on its content without having text wrapping to a new line and the table was spanning across the full width of the page.
I tried removing the fixed width from columns but then I have "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops." error:
Your minimal, reproducible example
https://github.com/dragos-cojocaru/tanstack-virtual-table-dynamic-width
Steps to reproduce
I created a repository where you can check the error: https://github.com/dragos-cojocaru/tanstack-virtual-table-dynamic-width:
- table-dynamic-column-width page is where I have the error because I removed the fixed width of columns
- table-fixed-column-width page is where the virtualization is working but I have fixed width for each table column.
Expected behavior
I want to have a tanstack table with virtualization that span across the whole page width and each column width should be dynamically to accommodate its content. Preferably I should be able to specify a max-width for all columns or for each column separately.
How often does this bug happen?
None
Screenshots or Videos
No response
Platform
- Windows 11 Pro
- Chrome 141.0.7390.108 (Official Build) (64-bit)
tanstack-virtual version
3.13.12
TypeScript version
No response
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.
- Langage dominant
- TypeScript
- Étoiles
- 7.1k
- Forks
- 472
- Merge moyen
- 1 j 1 h
- PR mergées (30 j)
- 11
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues 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)Peut-être pris @webn00b l’a pris il y a 12 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
anchorTo: 'end' loses the end when the scroll element shrinksPeut-être pris @langleyd l’a pris il y a 1 jour. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
`scrollToIndex(last, { align: 'end' })` stays short of the end after a measured row grows (virtual-core ≥ 3.17.0)Peut-être pris @minwookshin l’a pris il y a 9 jours. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
TanStack/virtual#1290 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
virtual-core: desktop Safari drops the prepend anchor write when history lands during the top rubber-band bouncePeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 38/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de TanStack/virtual
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
siyuan-note/siyuan#20313 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 92/100
alunduil/projects-v2-sync#14 ·
-
Service process inherits the caller's cwd at first use, holding that folder open on Windows (EBUSY)Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
DevTools page styles leak into the host app in developmentPeut-être pris @onmax l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
nuxt-modules/better-auth#567 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour