@innoways/hooks 9.0.9 → 9.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: optimize form data dispatch in useValidate to prevent unnecessary updates 9.0.11
8
+ - Updated dependencies
9
+ - @innoways/utils@9.0.11
10
+
11
+ ## 9.0.10
12
+
13
+ ### Patch Changes
14
+
15
+ - feat: add id prop support to StyledFlatPicker for better form labelling 9.1.0
16
+ - Updated dependencies
17
+ - @innoways/utils@9.0.10
18
+
3
19
  ## 9.0.9
4
20
 
5
21
  ### Patch Changes
package/dist/index.js CHANGED
@@ -5,8 +5,8 @@ import _useDebounceFn2 from 'ahooks/es/useDebounceFn';
5
5
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
6
6
  import _typeof from '@babel/runtime/helpers/typeof';
7
7
  import produce, { produce as produce$1 } from 'immer';
8
+ import { isEqual, isEmpty, typeCheck, generateReg, fetchFnJsonKey } from '@innoways/utils';
8
9
  import moment from 'moment';
9
- import { isEmpty, typeCheck, generateReg, fetchFnJsonKey } from '@innoways/utils';
10
10
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
11
11
  import _regeneratorRuntime from '@babel/runtime/regenerator';
12
12
 
@@ -291,12 +291,16 @@ var useValidate = function useValidate() {
291
291
  errors: errorsMap
292
292
  }
293
293
  });
294
- dispatch({
295
- type: 'setData',
296
- action: {
297
- formData: newFormData
298
- }
299
- });
294
+
295
+ if (!isEqual(formData, newFormData)) {
296
+ dispatch({
297
+ type: 'setData',
298
+ action: {
299
+ formData: newFormData
300
+ }
301
+ });
302
+ }
303
+
300
304
  dispatch({
301
305
  type: 'setChecking',
302
306
  checking: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innoways/hooks",
3
- "version": "9.0.9",
3
+ "version": "9.0.11",
4
4
  "description": "drip-form通用hooks",
5
5
  "keywords": [
6
6
  "hooks",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.10.2",
34
- "@innoways/utils": "^9.0.9",
34
+ "@innoways/utils": "^9.0.11",
35
35
  "ahooks": "^2.10.12",
36
36
  "ajv": "^8.6.2",
37
37
  "immer": "^9.0.5",