Skip to content

Commit 5ebb6d3

Browse files
authored
fix: add key for portal to avoid rerender (#4183)
1 parent df6609c commit 5ebb6d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/x6-react-shape/src/view.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class ReactShapeView extends NodeView<ReactShape> {
3232
if (container) {
3333
const elem = React.createElement(Wrap, { node, graph: this.graph })
3434
if (Portal.isActive()) {
35-
const portal = createPortal(elem, container) as ReactPortal
35+
const portal = createPortal(elem, container, node.id) as ReactPortal
3636
Portal.connect(this.targetId(), portal)
3737
} else {
3838
this.root = createRoot(container)

0 commit comments

Comments
 (0)