Skip to content

fix(form-antd-materials): pass TreeSelect a scalar path value - #1188

Open
ktz03 wants to merge 1 commit into
bytedance:mainfrom
ktz03:fix/antd-variable-selector-tree-value
Open

fix(form-antd-materials): pass TreeSelect a scalar path value#1188
ktz03 wants to merge 1 commit into
bytedance:mainfrom
ktz03:fix/antd-variable-selector-tree-value

Conversation

@ktz03

@ktz03 ktz03 commented Sep 3, 2026

Copy link
Copy Markdown

Summary

demo-nextjs-antd logs Ant Design warning: value should not be array when TreeSelect is single mode (ConditionRowVariableSelector).

@flowgram.ai/form-antd-materials VariableSelector stored refs as string[] keyPath but passed that array straight into Ant Design TreeSelect. The Semi-based @flowgram.ai/form-materials selector already joins the path for display.

This change:

  • joins keyPath with . for the TreeSelect value
  • maps the selected scalar key back to keyPath via the tree node
  • also wires disabled / status / placeholder for readonly and error states

Fixes #1030

Test plan

  • apps/demo-nextjs-antd: bun install && bun dev, open editor — console should no longer warn about TreeSelect array value
  • Condition node: pick left/right variables; clear still works when allowClear
  • Loop BatchVariableSelector still selects array variables

Ant Design TreeSelect warns when value is an array in single mode. Join keyPath for display and map selection back to keyPath, matching form-materials.

Fixes bytedance#1030
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] demo-nextjs-antd

1 participant