Skip to content

Commit

Permalink
fix: add key for portal to avoid rerender (#4183)
Browse files Browse the repository at this point in the history
  • Loading branch information
NewByVector authored Jan 24, 2024
1 parent df6609c commit 5ebb6d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/x6-react-shape/src/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class ReactShapeView extends NodeView<ReactShape> {
if (container) {
const elem = React.createElement(Wrap, { node, graph: this.graph })
if (Portal.isActive()) {
const portal = createPortal(elem, container) as ReactPortal
const portal = createPortal(elem, container, node.id) as ReactPortal
Portal.connect(this.targetId(), portal)
} else {
this.root = createRoot(container)
Expand Down

0 comments on commit 5ebb6d3

Please sign in to comment.