Skip to content
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: fix that the outline tree does not respond to modal addition/deletion related operations #1871

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

liujuping
Copy link
Collaborator

…etion related operations

@liujuping liujuping requested a review from JackLian as a code owner April 13, 2023 07:00
@liujuping liujuping changed the title fix: fix that the outline tree does not respond to modal addition/del… fix: fix that the outline tree does not respond to modal addition/deletion related operations Apr 13, 2023
@github-actions
Copy link

ChatGPT Code Review:

CodeReview:

这是一次对 tree-node.tsx 文件进行修复的提交,修复了树状结构不响应模态添加/删除的问题。

在 ModalTreeNodeView 组件中,state 中新增了 treeChildren,用于存储树形结构的子节点数据。在 componentDidMount 方法中,监听了根节点的 onExpandableChanged 事件,一旦发生变化就更新 state 中的 treeChildren 数据。在 render 方法中,将 rootTreeNode 和 state 中的 treeChildren 的数据分别传入 TreeBranches 组件,实现了树状结构的展示。

Typo或者建议:

  1. 第12行的逗号后需要添加一个空格。

  2. 在 componentDidMount 方法中,方法名的冒号和 void 之间建议添加一个空格。

@JackLian JackLian merged commit f1ff1a0 into develop Apr 13, 2023
@JackLian JackLian deleted the fix/outline-pane-modal-tree branch April 13, 2023 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants