Skip to content

fix(demo-free-layout): Rewrite copied condition value refs - #1139

Open
Gujiassh wants to merge 3 commits into
bytedance:mainfrom
Gujiassh:fix/copy-condition-values-1094
Open

fix(demo-free-layout): Rewrite copied condition value refs#1139
Gujiassh wants to merge 3 commits into
bytedance:mainfrom
Gujiassh:fix/copy-condition-values-1094

Conversation

@Gujiassh

Copy link
Copy Markdown
Contributor

Summary

Fixes #1094.

Copy/paste already rewrites copied node IDs in node IDs, edges, and older block-output references. Condition rows store selected variables as flow value refs such as { type: 'ref', content: ['node_id', 'field'] }, so copied condition values could still point at the original node ID.

This updates the paste ID rewrite to also rewrite the first segment of ref.content when that segment belongs to a copied node. References to nodes outside the copied selection are left unchanged.

Validation

  • node common/scripts/install-run-rush.js build --to @flowgram.ai/demo-free-layout
  • node ../../common/scripts/install-run-rushx.js ts-check
  • node ../../common/scripts/install-run-rushx.js lint
  • git diff --check

@sanmaopep sanmaopep left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

[Bug] copy a condition node with condition and values,this new node cannot render value,

2 participants