Skip to content

🐞MiniMap与react Portal冲突 导致react节点dom叠加 #4998

@sitexue

Description

@sitexue

问题描述

同时使用react Portal和MiniMap,并且将react节点设置id,并通过addChild设置父子关系,会产生如下问题:
1、控制太会告警id重复
2、同时如果删除其中一个子节点,会导致其余节点的dom重复。

重现链接

https://codesandbox.io/p/sandbox/rough-resonance-xc2hv3

重现步骤

1、进入页面
2、打开控制台,可以看到same key 的报错
3、选中显示为node的节点,按backspace删除该节点,就会出现dom重复的情况

预期行为

无控制台报错,删除节点时表现正常

平台

  • 操作系统: Windows
  • 网页浏览器: edge
  • X6 版本: 3.1.4

屏幕截图或视频(可选但最好有)

Image

补充说明(可选)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting for maintainerTriage or intervention needed from a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions