mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
fix: Add type of initialValue prop to Form.List (#28153)
* fix: Add type of initialValue prop to Form.List * Update index.zh-CN.md * Update index.en-US.md
This commit is contained in:
parent
52ceeafa7e
commit
ca5b47f674
@ -21,6 +21,7 @@ export interface FormListProps {
|
||||
prefixCls?: string;
|
||||
name: string | number | (string | number)[];
|
||||
rules?: ValidatorRule[];
|
||||
initialValue?: any[];
|
||||
children: (
|
||||
fields: FormListFieldData[],
|
||||
operation: FormListOperation,
|
||||
|
@ -169,7 +169,7 @@ Provides array management for fields.
|
||||
| Property | Description | Type | Default | Version |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| children | Render function | (fields: Field\[], operation: { add, remove, move }, meta: { errors }) => React.ReactNode | - | |
|
||||
| initialValue | Config sub default value. Form `initialValues` get higher priority when conflict | string | - | 4.9.0 |
|
||||
| initialValue | Config sub default value. Form `initialValues` get higher priority when conflict | any[] | - | 4.9.0 |
|
||||
| name | Field name, support array | [NamePath](#NamePath) | - | |
|
||||
| rules | Validate rules, only support customize validator. Should work with [ErrorList](#Form.ErrorList) | { validator, message }\[] | - | 4.7.0 |
|
||||
|
||||
|
@ -170,7 +170,7 @@ Form 通过增量更新方式,只更新被修改的字段相关组件以达到
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| children | 渲染函数 | (fields: Field\[], operation: { add, remove, move }, meta: { errors }) => React.ReactNode | - | |
|
||||
| initialValue | 设置子元素默认值,如果与 Form 的 `initialValues` 冲突则以 Form 为准 | string | - | 4.9.0 |
|
||||
| initialValue | 设置子元素默认值,如果与 Form 的 `initialValues` 冲突则以 Form 为准 | any[] | - | 4.9.0 |
|
||||
| name | 字段名,支持数组 | [NamePath](#NamePath) | - | |
|
||||
| rules | 校验规则,仅支持自定义规则。需要配合 [ErrorList](#Form.ErrorList) 一同使用。 | { validator, message }\[] | - | 4.7.0 |
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user