fix: trigger onFilterResultChanged when filtered#2813
Merged
liujuping merged 1 commit intoalibaba:developfrom Jan 5, 2024
Merged
fix: trigger onFilterResultChanged when filtered#2813liujuping merged 1 commit intoalibaba:developfrom
liujuping merged 1 commit intoalibaba:developfrom
Conversation
Collaborator
|
不太想加 forceRender,有没有更好的办法? |
Contributor
Author
加 forceRender 确实不是很好的方案,但我这边没有什么更好的想法了,想问下官方这边有没有别的什么思路? |
Contributor
Author
|
如果有搜索的情况下,拖拽和添加新组件时,大纲树的渲染也会有问题。 |
Collaborator
最好还是根据事件/引擎的 API 来实现,如果的确有 Case 实现不了,可以单独拿出来讨论一下。 |
d33829c to
4aa9b3b
Compare
4aa9b3b to
606662e
Compare
Contributor
Author
麻烦看下 treeNode.onFilterResultChanged 的使用方式正确吗? |
liujuping
reviewed
Jan 4, 2024
| const Tip = common.editorCabin.Tip; | ||
| const Title = common.editorCabin.Title; | ||
| const { Tip } = common.editorCabin; | ||
| const { Title } = common.editorCabin; |
Collaborator
There was a problem hiding this comment.
这里改成
const { Tip, Title } = common.editorCabin;
Collaborator
OK 的,有一个小的改动,辛苦再改一下。还有签一下 CLA |
606662e to
fc9e70b
Compare
Contributor
Author
done~ |
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.
大纲树现有问题
复现录屏:
2024-01-04.14.26.31.mov
原因分析
搜索时会修改 TreeNode 内的某些属性,但由于 TreeNode 对象比较复杂,没有触发大纲树中组件的重新渲染。
修复思路
搜索时会额外出发 forceRender 参数的变更,大纲树中组件监听该参数的变更。