/** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ import { Field, FieldRenderProps, FormMeta, WorkflowNodeRegistry, FormRenderProps, } from '@flowgram.ai/free-layout-editor'; import { FieldWrapper } from '@flowgram.ai/demo-node-form'; import { Input } from '@douyinfe/semi-ui'; import '../index.css'; interface FormData { country: string; city: string; } const render = ({ form }: FormRenderProps) => (
Visibility Examples
{({ field }: FieldRenderProps) => ( )} {({ field }: FieldRenderProps) => form.getValueIn('country') ? ( ) : ( <> ) }
); const formMeta: FormMeta = { render, }; export const nodeRegistry: WorkflowNodeRegistry = { type: 'custom', meta: {}, defaultPorts: [{ type: 'output' }, { type: 'input' }], formMeta, };