-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: trigger onFilterResultChanged when filtered #2813
fix: trigger onFilterResultChanged when filtered #2813
Conversation
不太想加 forceRender,有没有更好的办法? |
加 forceRender 确实不是很好的方案,但我这边没有什么更好的想法了,想问下官方这边有没有别的什么思路? |
如果有搜索的情况下,拖拽和添加新组件时,大纲树的渲染也会有问题。 |
最好还是根据事件/引擎的 API 来实现,如果的确有 Case 实现不了,可以单独拿出来讨论一下。 |
d33829c
to
4aa9b3b
Compare
4aa9b3b
to
606662e
Compare
麻烦看下 treeNode.onFilterResultChanged 的使用方式正确吗? |
const Tip = common.editorCabin.Tip; | ||
const Title = common.editorCabin.Title; | ||
const { Tip } = common.editorCabin; | ||
const { Title } = common.editorCabin; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里改成
const { Tip, Title } = common.editorCabin;
OK 的,有一个小的改动,辛苦再改一下。还有签一下 CLA |
606662e
to
fc9e70b
Compare
done~ |
大纲树现有问题
复现录屏:
2024-01-04.14.26.31.mov
原因分析
搜索时会修改 TreeNode 内的某些属性,但由于 TreeNode 对象比较复杂,没有触发大纲树中组件的重新渲染。
修复思路
搜索时会额外出发 forceRender 参数的变更,大纲树中组件监听该参数的变更。