Maximum update depth exceeded: rowVirtualizer.measureElement
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- react, typescript
- 领域
- frontend, performance
调研方向
首先运行链接的复现仓库,并将其 table-dynamic-column-width 页面与 table-fixed-column-width 页面进行比较。阅读 examples/react/virtualized-rows/src/main.tsx 中引用的 React 虚拟化示例,并跟踪 measureElement 的行为。当虚拟化能够在不出现 maximum update depth 错误的情况下运行,同时列在整个页面中动态调整大小并支持所请求的宽度约束时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- TypeScript
- 星标
- 7.1k
- 派生
- 472
- 平均合并
- 4 天 8 小时
- 30 天内合并 PR
- 14
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/virtual 的其他 Issue
-
anchorTo: 'end' loses the end when the scroll element shrinks可能已有人在做 @langleyd 于 3 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
维护者通常 2 天内回复
-
virtual-core: desktop Safari drops the prepend anchor write when history lands during the top rubber-band bounce可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 5/5 一周以上 新手友好度 38/100
维护者通常 2 天内回复
-
marko-virtual: scrollToEnd during an in-flight prepend strands the view one prepend above the bottom (chat-pretext e2e fails on CI)可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 4/5 3-5 天 新手友好度 55/100
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 42/100
TanStack/virtual#1252 · 1 条评论 ·
维护者通常 2 天内回复
-
lit-virtual: VirtualizerController never applies updated options after construction可能已有人在做 @waterWang 于 59 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 45/100
维护者通常 2 天内回复
相似的 Issue
-
Dependencies view: `getParent` loops forever on untitled documents, extension host runs out of memory可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
bug
难度 2/5 1 小时以内 新手友好度 82/100
awslabs/visual-asset-management-system#413 ·
维护者通常 1 天内回复
-
bug confirmed perf
难度 2/5 1-3 小时 新手友好度 72/100
videojs/video.js#9400 · 1 条评论 ·
维护者通常 1 天内回复
-
bug pending triage scope/agent
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复
-
good first issue hacktoberfest
难度 2/5 半天 新手友好度 70/100
HelpCode-ai/anythingmcp#996 ·
维护者通常 1 天内回复