@@ -59,43 +59,43 @@ We use typescript to create the Type definition. You can view directly in IDE. B
59
59
60
60
## Form
61
61
62
- | Prop | Description | Type | Default |
63
- | ---------------- | -------------------------------------------------- | ------------------------------------------ | ---------------- |
64
- | component | Customize Form render component | string \| Component \| false | form |
65
- | fields | Control Form fields status. Only use when in Redux | [ FieldData] ( #fielddata ) [ ] | - |
66
- | form | Set form instance created by ` useForm ` | [ FormInstance] ( #useform ) | ` Form.useForm() ` |
67
- | initialValues | Initial value of Form | Object | - |
68
- | name | Config name with [ FormProvider] ( #formprovider ) | string | - |
69
- | preserve | preserve value when field removed | boolean | false |
70
- | validateMessages | Set validate message template | [ ValidateMessages] ( #validatemessages ) | - |
71
- | onFieldsChange | Trigger when any value of Field changed | (changedFields, allFields): void | - |
72
- | onFinish | Trigger when form submit and success | (values): void | - |
73
- | onFinishFailed | Trigger when form submit and failed | ({ values, errorFields, outOfDate }): void | - |
74
- | onValuesChange | Trigger when any value of Field changed | (changedValues, values): void | - |
62
+ | Prop | Description | Type | Default |
63
+ | ---------------- | -------------------------------------------------- | -------------------------------------------- | ---------------- |
64
+ | component | Customize Form render component | string \| Component \| false | form |
65
+ | fields | Control Form fields status. Only use when in Redux | [ FieldData] ( #fielddata ) [ ] | - |
66
+ | form | Set form instance created by ` useForm ` | [ FormInstance] ( #useform ) | ` Form.useForm() ` |
67
+ | initialValues | Initial value of Form | Object | - |
68
+ | name | Config name with [ FormProvider] ( #formprovider ) | string | - |
69
+ | preserve | Preserve value when field removed | boolean | false |
70
+ | validateMessages | Set validate message template | [ ValidateMessages] ( #validatemessages ) | - |
71
+ | onFieldsChange | Trigger when any value of Field changed | (changedFields, allFields) => void | - |
72
+ | onFinish | Trigger when form submit and success | (values) => void | - |
73
+ | onFinishFailed | Trigger when form submit and failed | ({ values, errorFields, outOfDate }) => void | - |
74
+ | onValuesChange | Trigger when any value of Field changed | (changedValues, values) => void | - |
75
75
76
76
## Field
77
77
78
- | Prop | Description | Type | Default |
79
- | ----------------- | ----------------------------------------------------------------------------- | ----------------------------------------- | -------- |
80
- | dependencies | Will re-render if dependencies changed | [ NamePath] ( #namepath ) [ ] | - |
81
- | getValueFromEvent | Specify how to get value from event | (..args: any[ ] ) => any | - |
82
- | getValueProps | Customize additional props with value. This prop will disable ` valuePropName ` | (value) => any | - |
83
- | initialValue | Field initial value | any | - |
84
- | name | Field name path | [ NamePath] ( #namepath ) | - |
85
- | normalize | Normalize value before update | (value, prevValue, prevValues) => any | - |
86
- | preserve | preserve value when field removed | boolean | false |
87
- | rules | Validate rules | [ Rule] ( #rule ) [ ] | - |
88
- | shouldUpdate | Check if Field should update | true \| (prevValues, nextValues): boolean | - |
89
- | trigger | Collect value update by event trigger | string | onChange |
90
- | validateTrigger | Config trigger point with rule validate | string \| string[ ] | onChange |
91
- | valuePropName | Config value mapping prop with element | string | value |
78
+ | Prop | Description | Type | Default |
79
+ | ----------------- | ----------------------------------------------------------------------------- | ------------------------------------------- | -------- |
80
+ | dependencies | Will re-render if dependencies changed | [ NamePath] ( #namepath ) [ ] | - |
81
+ | getValueFromEvent | Specify how to get value from event | (..args: any[ ] ) => any | - |
82
+ | getValueProps | Customize additional props with value. This prop will disable ` valuePropName ` | (value) => any | - |
83
+ | initialValue | Field initial value | any | - |
84
+ | name | Field name path | [ NamePath] ( #namepath ) | - |
85
+ | normalize | Normalize value before update | (value, prevValue, prevValues) => any | - |
86
+ | preserve | Preserve value when field removed | boolean | false |
87
+ | rules | Validate rules | [ Rule] ( #rule ) [ ] | - |
88
+ | shouldUpdate | Check if Field should update | true \| (prevValues, nextValues) => boolean | - |
89
+ | trigger | Collect value update by event trigger | string | onChange |
90
+ | validateTrigger | Config trigger point with rule validate | string \| string[ ] | onChange |
91
+ | valuePropName | Config value mapping prop with element | string | value |
92
92
93
93
## List
94
94
95
- | Prop | Description | Type | Default |
96
- | -------- | ------------------------------- | ----------------------------------------------------------------------------------------------------- | ------- |
97
- | name | List field name path | [ NamePath] ( #namepath ) [ ] | - |
98
- | children | Render props for listing fields | (fields: { name: [ NamePath] ( #namepath ) }[ ] , operations: [ ListOperations] ( #listoperations ) ): ReactNode | - |
95
+ | Prop | Description | Type | Default |
96
+ | -------- | ------------------------------- | ------------------------------------------------------------------------------------------------------- | ------- |
97
+ | name | List field name path | [ NamePath] ( #namepath ) [ ] | - |
98
+ | children | Render props for listing fields | (fields: { name: [ NamePath] ( #namepath ) }[ ] , operations: [ ListOperations] ( #listoperations ) ) => ReactNode | - |
99
99
100
100
## useForm
101
101
0 commit comments