rc-field-form
Advanced tools
Comparing version 0.0.0-alpha.4 to 0.0.0-alpha.5
@@ -21,5 +21,5 @@ import * as React from 'react'; | ||
rules?: Rule[]; | ||
shouldUpdate?: (prevValues: Store, nextValues: Store, info: { | ||
shouldUpdate?: true | ((prevValues: Store, nextValues: Store, info: { | ||
source?: string; | ||
}) => boolean; | ||
}) => boolean); | ||
trigger?: string; | ||
@@ -26,0 +26,0 @@ validateTrigger?: string | string[] | false; |
@@ -193,3 +193,3 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
return containsNamePath(namePathList, getNamePath(dependency)); | ||
}) || (shouldUpdate ? shouldUpdate(prevStore, values, info) : prevValue !== curValue)) { | ||
}) || shouldUpdate === true || (typeof shouldUpdate === 'function' ? shouldUpdate(prevStore, values, info) : prevValue !== curValue)) { | ||
_this.reRender(); | ||
@@ -196,0 +196,0 @@ } |
@@ -21,5 +21,5 @@ import * as React from 'react'; | ||
rules?: Rule[]; | ||
shouldUpdate?: (prevValues: Store, nextValues: Store, info: { | ||
shouldUpdate?: true | ((prevValues: Store, nextValues: Store, info: { | ||
source?: string; | ||
}) => boolean; | ||
}) => boolean); | ||
trigger?: string; | ||
@@ -26,0 +26,0 @@ validateTrigger?: string | string[] | false; |
@@ -210,3 +210,3 @@ "use strict"; | ||
return (0, _valueUtil.containsNamePath)(namePathList, (0, _valueUtil.getNamePath)(dependency)); | ||
}) || (shouldUpdate ? shouldUpdate(prevStore, values, info) : prevValue !== curValue)) { | ||
}) || shouldUpdate === true || (typeof shouldUpdate === 'function' ? shouldUpdate(prevStore, values, info) : prevValue !== curValue)) { | ||
_this.reRender(); | ||
@@ -213,0 +213,0 @@ } |
{ | ||
"name": "rc-field-form", | ||
"version": "0.0.0-alpha.4", | ||
"version": "0.0.0-alpha.5", | ||
"description": "React Form Component", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -76,12 +76,12 @@ # rc-field-form | ||
| Prop | Description | Type | Default | | ||
| ----------------- | --------------------------------------- | ------------------------------------- | -------- | | ||
| dependencies | Will re-render if dependencies changed | [NamePath](#namepath)[] | - | | ||
| getValueFromEvent | Specify how to get value from event | (..args: any[]) => any | - | | ||
| name | Field name path | [NamePath](#namepath) | - | | ||
| normalize | Normalize value before update | (value, prevValue, prevValues) => any | - | | ||
| rules | Validate rules | [Rule](#rule)[] | - | | ||
| shouldUpdate | Check if Field should update | (prevValues, nextValues): boolean | - | | ||
| trigger | Collect value update by event trigger | string | onChange | | ||
| validateTrigger | Config trigger point with rule validate | string \| string[] | onChange | | ||
| Prop | Description | Type | Default | | ||
| ----------------- | --------------------------------------- | -------------------------------------------- | -------- | | ||
| dependencies | Will re-render if dependencies changed | [NamePath](#namepath)[] | - | | ||
| getValueFromEvent | Specify how to get value from event | (..args: any[]) => any | - | | ||
| name | Field name path | [NamePath](#namepath) | - | | ||
| normalize | Normalize value before update | (value, prevValue, prevValues) => any | - | | ||
| rules | Validate rules | [Rule](#rule)[] | - | | ||
| shouldUpdate | Check if Field should update | true \| (prevValues, nextValues): boolean | - | | ||
| trigger | Collect value update by event trigger | string | onChange | | ||
| validateTrigger | Config trigger point with rule validate | string \| string[] | onChange | | ||
@@ -88,0 +88,0 @@ ## List |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
196625