fix(demo): remove loop block nodes form validates & effects (#460)

This commit is contained in:
Louis Young 2025-07-04 11:35:28 +08:00 committed by GitHub
parent 1792e5f190
commit b0ebe5634d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 20 deletions

View File

@ -3,8 +3,7 @@
* SPDX-License-Identifier: MIT
*/
import { FormRenderProps, FormMeta, ValidateTrigger } from '@flowgram.ai/free-layout-editor';
import { provideJsonSchemaOutputs, syncVariableTitle } from '@flowgram.ai/form-materials';
import { FormRenderProps, FormMeta } from '@flowgram.ai/free-layout-editor';
import { Avatar } from '@douyinfe/semi-ui';
import { FlowNodeJSON } from '../../typings';
@ -38,12 +37,4 @@ export const renderForm = ({ form }: FormRenderProps<FlowNodeJSON>) => (
export const formMeta: FormMeta<FlowNodeJSON> = {
render: renderForm,
validateTrigger: ValidateTrigger.onChange,
validate: {
title: ({ value }: { value: string }) => (value ? undefined : 'Title is required'),
},
effect: {
title: syncVariableTitle,
outputs: provideJsonSchemaOutputs,
},
};

View File

@ -3,8 +3,7 @@
* SPDX-License-Identifier: MIT
*/
import { FormRenderProps, FormMeta, ValidateTrigger } from '@flowgram.ai/free-layout-editor';
import { provideJsonSchemaOutputs, syncVariableTitle } from '@flowgram.ai/form-materials';
import { FormRenderProps, FormMeta } from '@flowgram.ai/free-layout-editor';
import { Avatar } from '@douyinfe/semi-ui';
import { FlowNodeJSON } from '../../typings';
@ -38,12 +37,4 @@ export const renderForm = ({ form }: FormRenderProps<FlowNodeJSON>) => (
export const formMeta: FormMeta<FlowNodeJSON> = {
render: renderForm,
validateTrigger: ValidateTrigger.onChange,
validate: {
title: ({ value }: { value: string }) => (value ? undefined : 'Title is required'),
},
effect: {
title: syncVariableTitle,
outputs: provideJsonSchemaOutputs,
},
};