mirror of
https://gitee.com/ByteDance/flowgram.ai.git
synced 2025-07-07 17:43:29 +08:00
fix(demo): remove loop block nodes form validates & effects (#460)
This commit is contained in:
parent
1792e5f190
commit
b0ebe5634d
@ -3,8 +3,7 @@
|
|||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { FormRenderProps, FormMeta, ValidateTrigger } from '@flowgram.ai/free-layout-editor';
|
import { FormRenderProps, FormMeta } from '@flowgram.ai/free-layout-editor';
|
||||||
import { provideJsonSchemaOutputs, syncVariableTitle } from '@flowgram.ai/form-materials';
|
|
||||||
import { Avatar } from '@douyinfe/semi-ui';
|
import { Avatar } from '@douyinfe/semi-ui';
|
||||||
|
|
||||||
import { FlowNodeJSON } from '../../typings';
|
import { FlowNodeJSON } from '../../typings';
|
||||||
@ -38,12 +37,4 @@ export const renderForm = ({ form }: FormRenderProps<FlowNodeJSON>) => (
|
|||||||
|
|
||||||
export const formMeta: FormMeta<FlowNodeJSON> = {
|
export const formMeta: FormMeta<FlowNodeJSON> = {
|
||||||
render: renderForm,
|
render: renderForm,
|
||||||
validateTrigger: ValidateTrigger.onChange,
|
|
||||||
validate: {
|
|
||||||
title: ({ value }: { value: string }) => (value ? undefined : 'Title is required'),
|
|
||||||
},
|
|
||||||
effect: {
|
|
||||||
title: syncVariableTitle,
|
|
||||||
outputs: provideJsonSchemaOutputs,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,8 +3,7 @@
|
|||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { FormRenderProps, FormMeta, ValidateTrigger } from '@flowgram.ai/free-layout-editor';
|
import { FormRenderProps, FormMeta } from '@flowgram.ai/free-layout-editor';
|
||||||
import { provideJsonSchemaOutputs, syncVariableTitle } from '@flowgram.ai/form-materials';
|
|
||||||
import { Avatar } from '@douyinfe/semi-ui';
|
import { Avatar } from '@douyinfe/semi-ui';
|
||||||
|
|
||||||
import { FlowNodeJSON } from '../../typings';
|
import { FlowNodeJSON } from '../../typings';
|
||||||
@ -38,12 +37,4 @@ export const renderForm = ({ form }: FormRenderProps<FlowNodeJSON>) => (
|
|||||||
|
|
||||||
export const formMeta: FormMeta<FlowNodeJSON> = {
|
export const formMeta: FormMeta<FlowNodeJSON> = {
|
||||||
render: renderForm,
|
render: renderForm,
|
||||||
validateTrigger: ValidateTrigger.onChange,
|
|
||||||
validate: {
|
|
||||||
title: ({ value }: { value: string }) => (value ? undefined : 'Title is required'),
|
|
||||||
},
|
|
||||||
effect: {
|
|
||||||
title: syncVariableTitle,
|
|
||||||
outputs: provideJsonSchemaOutputs,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user