We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
嵌套列表里层依(第二项及之后)赖外层 dependValues 拿不到最新
import React, { useState, useEffect, useMemo } from 'react'; import FormRender, { useForm } from 'form-render'; import { Input } from 'antd'; const MyInput = React.memo((props: any) => { console.log('props =========>', props); const disabled = props.addons.dependValues?.[0] === 'xxx'; return ( <Input {...props} disabled={disabled} /> ) }) const schema = { type: 'object', maxWidth: 400, properties: { input1: { title: '输入框 1', type: 'string', }, list: { title: 'List 嵌套', type: 'array', widget: 'cardList', items: { type: 'object', title: 'List.Item', properties: { input4: { title: '输入框 4', type: 'string', }, list: { type: 'array', widget: 'cardList', items: { type: 'object', title: '二级 List.Item', properties: { delongInput2: { title: '输入框input6测试联动的校验(依赖 input4)', type: 'string', props: { placeholder: '当 input4 value 为 "xxx" 的时候 disabled 掉', }, dependencies: ['list[].input4'], widget: 'MyInput', }, }, }, }, }, }, }, }, }; export default () => { const form = useForm(); const watch = {}; return ( <FormRender schema={schema} form={form} watch={watch as any} widgets={{ MyInput }} /> ); };
The text was updated successfully, but these errors were encountered:
lhbxs
No branches or pull requests
嵌套列表里层依(第二项及之后)赖外层 dependValues 拿不到最新
The text was updated successfully, but these errors were encountered: