fix: prevent React plugin render loop - #5269
Draft
biubiukam wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 这个分支是...
🔗 相关 issue 连接
fix #4859
💡 问题的背景&解决方案
React
ListTable配置plugins={[new FilterPlugin({})]}后,内部表格渲染会更新updateId。原有handleTableRender同时依赖updateId和整个props,回调身份变化会再次触发 option effect。插件实例参与差异比较后,内部刷新会被持续识别为配置更新,最终触发 ReactMaximum update depth exceeded。本次修改:
handleTableRender改为稳定回调,并通过 ref 获取最新 props。setUpdateId,避免内部计数器成为回调依赖。onReady(instance, isInitial)的首次渲染语义。FilterPlugin的 React 回归测试。📝 Changelog
✅ 验证
react-vtable、vtable、vtable-plugins、vtable-gantt、vue-vtable测试通过。vtable-sheet仍存在缺失包构建产物及既有公式断言失败,本分支不包含packages/vtable-sheet改动。☑️ 自测
🚀 Summary
copilot:summary
🔍 Walkthrough
copilot:walkthrough