Skip to content

fix: improve close group in editor#267

Merged
mumiao merged 1 commit intomainfrom
fix/editor
Jul 22, 2021
Merged

fix: improve close group in editor#267
mumiao merged 1 commit intomainfrom
fix/editor

Conversation

@mortalYoung
Copy link
Copy Markdown
Collaborator

@mortalYoung mortalYoung commented Jul 22, 2021

简介

  • 修复 editor 标签组关闭时,会导致 editor 消失的问题
  • 优化 editor 实例销毁 model 实例的逻辑
  • 修复当 editor 标签组位于第一个的时候,关闭标签组不会自动切换到下一个标签组的问题

主要变更

  • 导致 editor 消失的问题,经过定位发现是 key 的问题。当关闭标签组内最后一个标签会导致标签组关闭,会触发 MonacoEditor 组件的重渲染,但是由于没有设置 key 的问题,导致重渲染有问题
  • 之前销毁 model 的逻辑有问题,没有去判断要销毁的 model 所对应的 tab 在其他标签组存在打开的情况

Related Issues

Closed #266 Closed #265

@mumiao mumiao merged commit 26bd958 into main Jul 22, 2021
@mumiao mumiao deleted the fix/editor branch July 22, 2021 10:27
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.

The editor instance display none after EditorGroup closed The EditorPane is displaying wrong after split the Pane

3 participants