@@ -24,7 +24,7 @@ open http://localhost:8000
24
24
## Feature
25
25
26
26
- Support react.js and even react-native
27
- - Validate fields with [ async-validator] ( https://github.com/yiminghe /async-validator/ )
27
+ - Validate fields with [ @ rc-component/ async-validator] ( https://github.com/react-component /async-validator/ )
28
28
29
29
## Install
30
30
@@ -35,13 +35,13 @@ open http://localhost:8000
35
35
``` js | pure
36
36
import Form , { Field } from ' rc-field-form' ;
37
37
38
- const Input = ({ value = " " , ... props }) => < input value= {value} {... props} / > ;
38
+ const Input = ({ value = ' ' , ... props }) => < input value= {value} {... props} / > ;
39
39
40
40
const Demo = () => {
41
41
return (
42
42
< Form
43
- onFinish= {( values ) => {
44
- console .log (" Finish:" , values);
43
+ onFinish= {values => {
44
+ console .log (' Finish:' , values);
45
45
}}
46
46
>
47
47
< Field name= " username" >
@@ -81,20 +81,20 @@ We use typescript to create the Type definition. You can view directly in IDE. B
81
81
82
82
### Field
83
83
84
- | Prop | Description | Type | Default |
85
- | ----------------- | ----------------------------------------------------------------------------- | ------------------------------------------- | -------- |
86
- | dependencies | Will re-render if dependencies changed | [ NamePath] ( #namepath ) [ ] | - |
87
- | getValueFromEvent | Specify how to get value from event | (..args: any[ ] ) => any | - |
88
- | getValueProps | Customize additional props with value. This prop will disable ` valuePropName ` | (value) => any | - |
89
- | initialValue | Field initial value | any | - |
90
- | name | Field name path | [ NamePath] ( #namepath ) | - |
91
- | normalize | Normalize value before update | (value, prevValue, prevValues) => any | - |
92
- | preserve | Preserve value when field removed | boolean | false |
93
- | rules | Validate rules | [ Rule] ( #rule ) [ ] | - |
84
+ | Prop | Description | Type | Default |
85
+ | ----------------- | ----------------------------------------------------------------------------- | ---------------------------------------------- | -------- |
86
+ | dependencies | Will re-render if dependencies changed | [ NamePath] ( #namepath ) [ ] | - |
87
+ | getValueFromEvent | Specify how to get value from event | (..args: any[ ] ) => any | - |
88
+ | getValueProps | Customize additional props with value. This prop will disable ` valuePropName ` | (value) => any | - |
89
+ | initialValue | Field initial value | any | - |
90
+ | name | Field name path | [ NamePath] ( #namepath ) | - |
91
+ | normalize | Normalize value before update | (value, prevValue, prevValues) => any | - |
92
+ | preserve | Preserve value when field removed | boolean | false |
93
+ | rules | Validate rules | [ Rule] ( #rule ) [ ] | - |
94
94
| shouldUpdate | Check if Field should update | boolean \| (prevValues, nextValues) => boolean | - |
95
- | trigger | Collect value update by event trigger | string | onChange |
96
- | validateTrigger | Config trigger point with rule validate | string \| string[ ] | onChange |
97
- | valuePropName | Config value mapping prop with element | string | value |
95
+ | trigger | Collect value update by event trigger | string | onChange |
96
+ | validateTrigger | Config trigger point with rule validate | string \| string[ ] | onChange |
97
+ | valuePropName | Config value mapping prop with element | string | value |
98
98
99
99
### List
100
100
0 commit comments