@@ -24,7 +24,7 @@ open http://localhost:8000
2424## Feature
2525
2626- 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/ )
2828
2929## Install
3030
@@ -35,13 +35,13 @@ open http://localhost:8000
3535``` js | pure
3636import Form , { Field } from ' rc-field-form' ;
3737
38- const Input = ({ value = " " , ... props }) => < input value= {value} {... props} / > ;
38+ const Input = ({ value = ' ' , ... props }) => < input value= {value} {... props} / > ;
3939
4040const Demo = () => {
4141 return (
4242 < Form
43- onFinish= {( values ) => {
44- console .log (" Finish:" , values);
43+ onFinish= {values => {
44+ console .log (' Finish:' , values);
4545 }}
4646 >
4747 < Field name= " username" >
@@ -81,20 +81,20 @@ We use typescript to create the Type definition. You can view directly in IDE. B
8181
8282### Field
8383
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 ) [ ] | - |
9494| 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 |
9898
9999### List
100100
0 commit comments