/** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ import React from 'react'; import { FieldArray } from '@flowgram.ai/editor'; import { Button } from '@douyinfe/semi-ui'; import { IconPlus } from '@douyinfe/semi-icons'; import { AssignRow, AssignValueType } from '@/components/assign-row'; interface AssignRowsProps { name: string; readonly?: boolean; defaultValue?: AssignValueType[]; } export function AssignRows(props: AssignRowsProps) { const { name, readonly, defaultValue } = props; return ( name={name} defaultValue={defaultValue}> {({ field }) => (
{field.map((childField, index) => ( { childField.onChange(value); }} onDelete={() => field.remove(index)} /> ))}
)} ); }